From 47834b5efcbfcd8d3e701553b0a1762c3dc414fd Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 7 Feb 2024 00:22:15 -0800 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2403) --- api-list.json | 4 +- cloudidentity/v1/cloudidentity-api.json | 4 +- cloudidentity/v1/cloudidentity-gen.go | 9 +- cloudtasks/v2/cloudtasks-api.json | 4 +- cloudtasks/v2/cloudtasks-gen.go | 6 +- cloudtasks/v2beta2/cloudtasks-api.json | 4 +- cloudtasks/v2beta2/cloudtasks-gen.go | 6 +- cloudtasks/v2beta3/cloudtasks-api.json | 4 +- cloudtasks/v2beta3/cloudtasks-gen.go | 6 +- compute/v0.beta/compute-api.json | 34 +- compute/v0.beta/compute-gen.go | 71 +- compute/v1/compute-api.json | 79 +- compute/v1/compute-gen.go | 187 +- .../v1alpha/discoveryengine-api.json | 522 +- .../v1alpha/discoveryengine-gen.go | 9934 ++++++++++------- .../v1beta/discoveryengine-api.json | 483 +- discoveryengine/v1beta/discoveryengine-gen.go | 9495 +++++++++------- healthcare/v1/healthcare-api.json | 73 +- healthcare/v1/healthcare-gen.go | 111 +- healthcare/v1beta1/healthcare-api.json | 289 +- healthcare/v1beta1/healthcare-gen.go | 568 +- .../v1/recaptchaenterprise-api.json | 12 +- .../v1/recaptchaenterprise-gen.go | 13 + retail/v2/retail-api.json | 170 +- retail/v2/retail-gen.go | 459 + retail/v2alpha/retail-api.json | 82 +- retail/v2alpha/retail-gen.go | 165 + retail/v2beta/retail-api.json | 82 +- retail/v2beta/retail-gen.go | 165 + walletobjects/v1/walletobjects-api.json | 5 +- walletobjects/v1/walletobjects-gen.go | 1 + 31 files changed, 14858 insertions(+), 8189 deletions(-) diff --git a/api-list.json b/api-list.json index 2173c4b5e7d..a5c058e1f76 100644 --- a/api-list.json +++ b/api-list.json @@ -2559,8 +2559,8 @@ "id": "dlp:v2", "name": "dlp", "version": "v2", - "title": "Cloud Data Loss Prevention (DLP)", - "description": "Provides methods for detection, risk analysis, and de-identification of privacy-sensitive fragments in text, images, and Google Cloud Platform storage repositories.", + "title": "Sensitive Data Protection (DLP)", + "description": "Discover and protect your sensitive data. A fully managed service designed to help you discover, classify, and protect your valuable data assets with ease.", "discoveryRestUrl": "https://dlp.googleapis.com/$discovery/rest?version=v2", "icons": { "x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", diff --git a/cloudidentity/v1/cloudidentity-api.json b/cloudidentity/v1/cloudidentity-api.json index 810c98a7165..cfa3ae22a7b 100644 --- a/cloudidentity/v1/cloudidentity-api.json +++ b/cloudidentity/v1/cloudidentity-api.json @@ -700,7 +700,7 @@ "type": "string" }, "rawResourceId": { - "description": "Raw Resource Id used by Google Endpoint Verification. If the user is enrolled into Google Endpoint Verification, this id will be saved as the 'device_resource_id' field in the following platform dependent files. Mac: ~/.secureConnect/context_aware_config.json Windows: C:\\Users\\%USERPROFILE%\\.secureConnect\\context_aware_config.json Linux: ~/.secureConnect/context_aware_config.json", + "description": "Raw Resource Id used by Google Endpoint Verification. If the user is enrolled into Google Endpoint Verification, this id will be saved as the 'device_resource_id' field in the following platform dependent files. * macOS: ~/.secureConnect/context_aware_config.json * Windows: %USERPROFILE%\\AppData\\Local\\Google\\Endpoint Verification\\accounts.json * Linux: ~/.secureConnect/context_aware_config.json", "location": "query", "type": "string" }, @@ -1990,7 +1990,7 @@ } } }, - "revision": "20240101", + "revision": "20240206", "rootUrl": "https://cloudidentity.googleapis.com/", "schemas": { "AddIdpCredentialOperationMetadata": { diff --git a/cloudidentity/v1/cloudidentity-gen.go b/cloudidentity/v1/cloudidentity-gen.go index 480496e1876..ad3f4ed2690 100644 --- a/cloudidentity/v1/cloudidentity-gen.go +++ b/cloudidentity/v1/cloudidentity-gen.go @@ -6475,9 +6475,10 @@ func (c *DevicesDeviceUsersLookupCall) PageToken(pageToken string) *DevicesDevic // Resource Id used by Google Endpoint Verification. If the user is // enrolled into Google Endpoint Verification, this id will be saved as // the 'device_resource_id' field in the following platform dependent -// files. Mac: ~/.secureConnect/context_aware_config.json Windows: -// C:\Users\%USERPROFILE%\.secureConnect\context_aware_config.json -// Linux: ~/.secureConnect/context_aware_config.json +// files. * macOS: ~/.secureConnect/context_aware_config.json * Windows: +// %USERPROFILE%\AppData\Local\Google\Endpoint +// Verification\accounts.json * Linux: +// ~/.secureConnect/context_aware_config.json func (c *DevicesDeviceUsersLookupCall) RawResourceId(rawResourceId string) *DevicesDeviceUsersLookupCall { c.urlParams_.Set("rawResourceId", rawResourceId) return c @@ -6625,7 +6626,7 @@ func (c *DevicesDeviceUsersLookupCall) Do(opts ...googleapi.CallOption) (*Google // "type": "string" // }, // "rawResourceId": { - // "description": "Raw Resource Id used by Google Endpoint Verification. If the user is enrolled into Google Endpoint Verification, this id will be saved as the 'device_resource_id' field in the following platform dependent files. Mac: ~/.secureConnect/context_aware_config.json Windows: C:\\Users\\%USERPROFILE%\\.secureConnect\\context_aware_config.json Linux: ~/.secureConnect/context_aware_config.json", + // "description": "Raw Resource Id used by Google Endpoint Verification. If the user is enrolled into Google Endpoint Verification, this id will be saved as the 'device_resource_id' field in the following platform dependent files. * macOS: ~/.secureConnect/context_aware_config.json * Windows: %USERPROFILE%\\AppData\\Local\\Google\\Endpoint Verification\\accounts.json * Linux: ~/.secureConnect/context_aware_config.json", // "location": "query", // "type": "string" // }, diff --git a/cloudtasks/v2/cloudtasks-api.json b/cloudtasks/v2/cloudtasks-api.json index 9016e3c212f..a181386343e 100644 --- a/cloudtasks/v2/cloudtasks-api.json +++ b/cloudtasks/v2/cloudtasks-api.json @@ -779,7 +779,7 @@ } } }, - "revision": "20240102", + "revision": "20240130", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpRequest": { @@ -898,7 +898,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudtasks/v2/cloudtasks-gen.go b/cloudtasks/v2/cloudtasks-gen.go index fbd39f0d698..759eac92d7f 100644 --- a/cloudtasks/v2/cloudtasks-gen.go +++ b/cloudtasks/v2/cloudtasks-gen.go @@ -536,7 +536,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudtasks/v2beta2/cloudtasks-api.json b/cloudtasks/v2beta2/cloudtasks-api.json index 9f1d95d540c..f83cb892f95 100644 --- a/cloudtasks/v2beta2/cloudtasks-api.json +++ b/cloudtasks/v2beta2/cloudtasks-api.json @@ -935,7 +935,7 @@ } } }, - "revision": "20240102", + "revision": "20240130", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AcknowledgeTaskRequest": { @@ -1077,7 +1077,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudtasks/v2beta2/cloudtasks-gen.go b/cloudtasks/v2beta2/cloudtasks-gen.go index 972cb1c9e33..36abeaa5164 100644 --- a/cloudtasks/v2beta2/cloudtasks-gen.go +++ b/cloudtasks/v2beta2/cloudtasks-gen.go @@ -647,7 +647,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/cloudtasks/v2beta3/cloudtasks-api.json b/cloudtasks/v2beta3/cloudtasks-api.json index db1233710d3..dca2e0eebc1 100644 --- a/cloudtasks/v2beta3/cloudtasks-api.json +++ b/cloudtasks/v2beta3/cloudtasks-api.json @@ -791,7 +791,7 @@ } } }, - "revision": "20240102", + "revision": "20240130", "rootUrl": "https://cloudtasks.googleapis.com/", "schemas": { "AppEngineHttpQueue": { @@ -921,7 +921,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, diff --git a/cloudtasks/v2beta3/cloudtasks-gen.go b/cloudtasks/v2beta3/cloudtasks-gen.go index edd854c1d47..07a43655ee8 100644 --- a/cloudtasks/v2beta3/cloudtasks-gen.go +++ b/cloudtasks/v2beta3/cloudtasks-gen.go @@ -571,7 +571,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 973d439da1d..a0d3230c41a 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -40310,7 +40310,7 @@ } } }, - "revision": "20240129", + "revision": "20240130", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -63225,22 +63225,22 @@ }, "appEngine": { "$ref": "NetworkEndpointGroupAppEngine", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set." }, "cloudFunction": { "$ref": "NetworkEndpointGroupCloudFunction", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set." }, "cloudRun": { "$ref": "NetworkEndpointGroupCloudRun", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set." }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, "defaultPort": { - "description": "The default port used if the port number is not specified in the network endpoint.", + "description": "The default port used if the port number is not specified in the network endpoint. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified.", "format": "int32", "type": "integer" }, @@ -63268,7 +63268,7 @@ "type": "string" }, "network": { - "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified.", + "description": "The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.", "type": "string" }, "networkEndpointType": { @@ -63297,7 +63297,7 @@ "$ref": "NetworkEndpointGroupPscData" }, "pscTargetService": { - "description": "The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: \"asia-northeast3-cloudkms.googleapis.com\"", + "description": "The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: asia-northeast3-cloudkms.googleapis.com", "type": "string" }, "region": { @@ -63310,7 +63310,7 @@ }, "serverlessDeployment": { "$ref": "NetworkEndpointGroupServerlessDeployment", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set." }, "size": { "description": "[Output only] Number of network endpoints in the network endpoint group.", @@ -63492,15 +63492,15 @@ "id": "NetworkEndpointGroupAppEngine", "properties": { "service": { - "description": "Optional serving service. The service name is case-sensitive and must be 1-63 characters long. Example value: \"default\", \"my-service\".", + "description": "Optional serving service. The service name is case-sensitive and must be 1-63 characters long. Example value: default, my-service.", "type": "string" }, "urlMask": { - "description": "A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services. For example, the request URLs \"foo1-dot-appname.appspot.com/v1\" and \"foo1-dot-appname.appspot.com/v2\" can be backed by the same Serverless NEG with URL mask \"\u003cservice\u003e-dot-appname.appspot.com/\u003cversion\u003e\". The URL mask will parse them to { service = \"foo1\", version = \"v1\" } and { service = \"foo1\", version = \"v2\" } respectively.", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services. For example, the request URLs foo1-dot-appname.appspot.com/v1 and foo1-dot-appname.appspot.com/v2 can be backed by the same Serverless NEG with URL mask \u003cservice\u003e-dot-appname.appspot.com/\u003cversion\u003e. The URL mask will parse them to { service = \"foo1\", version = \"v1\" } and { service = \"foo1\", version = \"v2\" } respectively.", "type": "string" }, "version": { - "description": "Optional serving version. The version name is case-sensitive and must be 1-100 characters long. Example value: \"v1\", \"v2\".", + "description": "Optional serving version. The version name is case-sensitive and must be 1-100 characters long. Example value: v1, v2.", "type": "string" } }, @@ -63511,11 +63511,11 @@ "id": "NetworkEndpointGroupCloudFunction", "properties": { "function": { - "description": "A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 characters long. Example value: \"func1\".", + "description": "A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 characters long. Example value: func1.", "type": "string" }, "urlMask": { - "description": "A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services. For example, request URLs \" mydomain.com/function1\" and \"mydomain.com/function2\" can be backed by the same Serverless NEG with URL mask \"/\u003cfunction\u003e\". The URL mask will parse them to { function = \"function1\" } and { function = \"function2\" } respectively.", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services. For example, request URLs mydomain.com/function1 and mydomain.com/function2 can be backed by the same Serverless NEG with URL mask /\u003cfunction\u003e. The URL mask will parse them to { function = \"function1\" } and { function = \"function2\" } respectively.", "type": "string" } }, @@ -63534,7 +63534,7 @@ "type": "string" }, "urlMask": { - "description": "A template to parse \u003cservice\u003e and \u003ctag\u003e fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services. For example, request URLs \"foo1.domain.com/bar1\" and \"foo1.domain.com/bar2\" can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask \"\u003ctag\u003e.domain.com/\u003cservice\u003e\". The URL mask will parse them to { service=\"bar1\", tag=\"foo1\" } and { service=\"bar2\", tag=\"foo2\" } respectively.", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse \u003cservice\u003e and \u003ctag\u003e fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services. For example, request URLs foo1.domain.com/bar1 and foo1.domain.com/bar2 can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask \u003ctag\u003e.domain.com/\u003cservice\u003e. The URL mask will parse them to { service=\"bar1\", tag=\"foo1\" } and { service=\"bar2\", tag=\"foo2\" } respectively.", "type": "string" } }, @@ -63546,13 +63546,13 @@ "properties": { "defaultPort": { "deprecated": true, - "description": "The default port used if the port number is not specified in the network endpoint. [Deprecated] This field is deprecated.", + "description": "The default port used if the port number is not specified in the network endpoint. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified. [Deprecated] This field is deprecated.", "format": "int32", "type": "integer" }, "network": { "deprecated": true, - "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified. [Deprecated] This field is deprecated.", + "description": "The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified. [Deprecated] This field is deprecated.", "type": "string" }, "subnetwork": { @@ -63768,7 +63768,7 @@ "type": "string" }, "urlMask": { - "description": "A template to parse platform-specific fields from a request URL. URL mask allows for routing to multiple resources on the same serverless platform without having to create multiple Network Endpoint Groups and backend resources. The fields parsed by this template are platform-specific and are as follows: 1. API Gateway: The gateway ID 2. App Engine: The service and version 3. Cloud Functions: The function name 4. Cloud Run: The service and tag ", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse platform-specific fields from a request URL. URL mask allows for routing to multiple resources on the same serverless platform without having to create multiple Network Endpoint Groups and backend resources. The fields parsed by this template are platform-specific and are as follows: 1. API Gateway: The gateway ID 2. App Engine: The service and version 3. Cloud Functions: The function name 4. Cloud Run: The service and tag ", "type": "string" }, "version": { diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index baa8571ec41..87cd02b3d50 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -34543,16 +34543,16 @@ type NetworkEndpointGroup struct { // group. Annotations map[string]string `json:"annotations,omitempty"` - // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only + // AppEngine: Only valid when networkEndpointType is SERVERLESS. Only // one of cloudRun, appEngine or cloudFunction may be set. AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` - // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". + // CloudFunction: Only valid when networkEndpointType is SERVERLESS. // Only one of cloudRun, appEngine or cloudFunction may be set. CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` - // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only - // one of cloudRun, appEngine or cloudFunction may be set. + // CloudRun: Only valid when networkEndpointType is SERVERLESS. Only one + // of cloudRun, appEngine or cloudFunction may be set. CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -34560,7 +34560,9 @@ type NetworkEndpointGroup struct { CreationTimestamp string `json:"creationTimestamp,omitempty"` // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. + // specified in the network endpoint. If the network endpoint type is + // either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field + // must not be specified. DefaultPort int64 `json:"defaultPort,omitempty"` // Description: An optional description of this resource. Provide this @@ -34590,7 +34592,7 @@ type NetworkEndpointGroup struct { Name string `json:"name,omitempty"` // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. + // NEG belong. Uses default project network if unspecified. Network string `json:"network,omitempty"` // NetworkEndpointType: Type of network endpoints in this network @@ -34621,7 +34623,7 @@ type NetworkEndpointGroup struct { // PscTargetService: The target service url used to set up private // service connection to a Google API or a PSC Producer Service // Attachment. An example value is: - // "asia-northeast3-cloudkms.googleapis.com" + // asia-northeast3-cloudkms.googleapis.com PscTargetService string `json:"pscTargetService,omitempty"` // Region: [Output Only] The URL of the region where the network @@ -34632,7 +34634,7 @@ type NetworkEndpointGroup struct { SelfLink string `json:"selfLink,omitempty"` // ServerlessDeployment: Only valid when networkEndpointType is - // "SERVERLESS". Only one of cloudRun, appEngine, cloudFunction or + // SERVERLESS. Only one of cloudRun, appEngine, cloudFunction or // serverlessDeployment may be set. ServerlessDeployment *NetworkEndpointGroupServerlessDeployment `json:"serverlessDeployment,omitempty"` @@ -34879,24 +34881,23 @@ func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, e // located in the same region as the Serverless NEG. type NetworkEndpointGroupAppEngine struct { // Service: Optional serving service. The service name is case-sensitive - // and must be 1-63 characters long. Example value: "default", - // "my-service". + // and must be 1-63 characters long. Example value: default, my-service. Service string `json:"service,omitempty"` - // UrlMask: A template to parse service and version fields from a + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse service and version fields from a // request URL. URL mask allows for routing to multiple App Engine // services without having to create multiple Network Endpoint Groups // and backend services. For example, the request URLs - // "foo1-dot-appname.appspot.com/v1" and - // "foo1-dot-appname.appspot.com/v2" can be backed by the same - // Serverless NEG with URL mask - // "-dot-appname.appspot.com/". The URL mask will - // parse them to { service = "foo1", version = "v1" } and { service = - // "foo1", version = "v2" } respectively. + // foo1-dot-appname.appspot.com/v1 and foo1-dot-appname.appspot.com/v2 + // can be backed by the same Serverless NEG with URL mask + // -dot-appname.appspot.com/. The URL mask will parse + // them to { service = "foo1", version = "v1" } and { service = "foo1", + // version = "v2" } respectively. UrlMask string `json:"urlMask,omitempty"` // Version: Optional serving version. The version name is case-sensitive - // and must be 1-100 characters long. Example value: "v1", "v2". + // and must be 1-100 characters long. Example value: v1, v2. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Service") to @@ -34929,16 +34930,17 @@ func (s *NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { type NetworkEndpointGroupCloudFunction struct { // Function: A user-defined name of the Cloud Function. The function // name is case-sensitive and must be 1-63 characters long. Example - // value: "func1". + // value: func1. Function string `json:"function,omitempty"` - // UrlMask: A template to parse function field from a request URL. URL + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse function field from a request URL. URL // mask allows for routing to multiple Cloud Functions without having to // create multiple Network Endpoint Groups and backend services. For - // example, request URLs " mydomain.com/function1" and - // "mydomain.com/function2" can be backed by the same Serverless NEG - // with URL mask "/". The URL mask will parse them to { - // function = "function1" } and { function = "function2" } respectively. + // example, request URLs mydomain.com/function1 and + // mydomain.com/function2 can be backed by the same Serverless NEG with + // URL mask /. The URL mask will parse them to { function = + // "function1" } and { function = "function2" } respectively. UrlMask string `json:"urlMask,omitempty"` // ForceSendFields is a list of field names (e.g. "Function") to @@ -34981,12 +34983,13 @@ type NetworkEndpointGroupCloudRun struct { // "revision-0010". Tag string `json:"tag,omitempty"` - // UrlMask: A template to parse and fields from a + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse and fields from a // request URL. URL mask allows for routing to multiple Run services // without having to create multiple network endpoint groups and backend - // services. For example, request URLs "foo1.domain.com/bar1" and - // "foo1.domain.com/bar2" can be backed by the same Serverless Network - // Endpoint Group (NEG) with URL mask ".domain.com/". The + // services. For example, request URLs foo1.domain.com/bar1 and + // foo1.domain.com/bar2 can be backed by the same Serverless Network + // Endpoint Group (NEG) with URL mask .domain.com/. The // URL mask will parse them to { service="bar1", tag="foo1" } and { // service="bar2", tag="foo2" } respectively. UrlMask string `json:"urlMask,omitempty"` @@ -35018,13 +35021,14 @@ func (s *NetworkEndpointGroupCloudRun) MarshalJSON() ([]byte, error) { // fields for network endpoint group. type NetworkEndpointGroupLbNetworkEndpointGroup struct { // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. [Deprecated] This field is - // deprecated. + // specified in the network endpoint. If the network endpoint type is + // either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field + // must not be specified. [Deprecated] This field is deprecated. DefaultPort int64 `json:"defaultPort,omitempty"` // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. - // [Deprecated] This field is deprecated. + // NEG belong. Uses default project network if unspecified. [Deprecated] + // This field is deprecated. Network string `json:"network,omitempty"` // Subnetwork: Optional URL of the subnetwork to which all network @@ -35317,7 +35321,8 @@ type NetworkEndpointGroupServerlessDeployment struct { // Functions: The function name 4. Cloud Run: The service name Resource string `json:"resource,omitempty"` - // UrlMask: A template to parse platform-specific fields from a request + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse platform-specific fields from a request // URL. URL mask allows for routing to multiple resources on the same // serverless platform without having to create multiple Network // Endpoint Groups and backend resources. The fields parsed by this diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index ed6a695c236..f7717dfd21b 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -35427,7 +35427,7 @@ } } }, - "revision": "20240129", + "revision": "20240130", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -47921,6 +47921,10 @@ "description": "Represents a Managed Instance Group resource. An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups. For zonal Managed Instance Group, use the instanceGroupManagers resource. For regional Managed Instance Group, use the regionInstanceGroupManagers resource.", "id": "InstanceGroupManager", "properties": { + "allInstancesConfig": { + "$ref": "InstanceGroupManagerAllInstancesConfig", + "description": "Specifies configuration that overrides the instance template configuration for the group." + }, "autoHealingPolicies": { "description": "The autohealing policy for this managed instance group. You can specify only one value.", "items": { @@ -48288,6 +48292,16 @@ }, "type": "object" }, + "InstanceGroupManagerAllInstancesConfig": { + "id": "InstanceGroupManagerAllInstancesConfig", + "properties": { + "properties": { + "$ref": "InstancePropertiesPatch", + "description": "Properties to set on all instances in the group. You can add or modify properties using the instanceGroupManagers.patch or regionInstanceGroupManagers.patch. After setting allInstancesConfig on the group, you must update the group's instances to apply the configuration. To apply the configuration, set the group's updatePolicy.type field to use proactive updates or use the applyUpdatesToInstances method." + } + }, + "type": "object" + }, "InstanceGroupManagerAutoHealingPolicy": { "id": "InstanceGroupManagerAutoHealingPolicy", "properties": { @@ -48476,6 +48490,10 @@ "InstanceGroupManagerStatus": { "id": "InstanceGroupManagerStatus", "properties": { + "allInstancesConfig": { + "$ref": "InstanceGroupManagerStatusAllInstancesConfig", + "description": "[Output only] Status of all-instances configuration on the group." + }, "autoscaler": { "description": "[Output Only] The URL of the Autoscaler that targets this instance group manager.", "type": "string" @@ -48495,6 +48513,20 @@ }, "type": "object" }, + "InstanceGroupManagerStatusAllInstancesConfig": { + "id": "InstanceGroupManagerStatusAllInstancesConfig", + "properties": { + "currentRevision": { + "description": "[Output Only] Current all-instances configuration revision. This value is in RFC3339 text format.", + "type": "string" + }, + "effective": { + "description": "[Output Only] A bit indicating whether this configuration has been applied to all managed instances in the group.", + "type": "boolean" + } + }, + "type": "object" + }, "InstanceGroupManagerStatusStateful": { "id": "InstanceGroupManagerStatusStateful", "properties": { @@ -50007,6 +50039,27 @@ }, "type": "object" }, + "InstancePropertiesPatch": { + "description": "Represents the change that you want to make to the instance properties.", + "id": "InstancePropertiesPatch", + "properties": { + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "The label key-value pairs that you want to patch onto the instance.", + "type": "object" + }, + "metadata": { + "additionalProperties": { + "type": "string" + }, + "description": "The metadata key-value pairs that you want to patch onto the instance. For more information, see Project and instance metadata.", + "type": "object" + } + }, + "type": "object" + }, "InstanceReference": { "id": "InstanceReference", "properties": { @@ -55883,22 +55936,22 @@ }, "appEngine": { "$ref": "NetworkEndpointGroupAppEngine", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set." }, "cloudFunction": { "$ref": "NetworkEndpointGroupCloudFunction", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set." }, "cloudRun": { "$ref": "NetworkEndpointGroupCloudRun", - "description": "Only valid when networkEndpointType is \"SERVERLESS\". Only one of cloudRun, appEngine or cloudFunction may be set." + "description": "Only valid when networkEndpointType is SERVERLESS. Only one of cloudRun, appEngine or cloudFunction may be set." }, "creationTimestamp": { "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, "defaultPort": { - "description": "The default port used if the port number is not specified in the network endpoint.", + "description": "The default port used if the port number is not specified in the network endpoint. If the network endpoint type is either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field must not be specified.", "format": "int32", "type": "integer" }, @@ -55921,7 +55974,7 @@ "type": "string" }, "network": { - "description": "The URL of the network to which all network endpoints in the NEG belong. Uses \"default\" project network if unspecified.", + "description": "The URL of the network to which all network endpoints in the NEG belong. Uses default project network if unspecified.", "type": "string" }, "networkEndpointType": { @@ -55950,7 +56003,7 @@ "$ref": "NetworkEndpointGroupPscData" }, "pscTargetService": { - "description": "The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: \"asia-northeast3-cloudkms.googleapis.com\"", + "description": "The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: asia-northeast3-cloudkms.googleapis.com", "type": "string" }, "region": { @@ -56141,15 +56194,15 @@ "id": "NetworkEndpointGroupAppEngine", "properties": { "service": { - "description": "Optional serving service. The service name is case-sensitive and must be 1-63 characters long. Example value: \"default\", \"my-service\".", + "description": "Optional serving service. The service name is case-sensitive and must be 1-63 characters long. Example value: default, my-service.", "type": "string" }, "urlMask": { - "description": "A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services. For example, the request URLs \"foo1-dot-appname.appspot.com/v1\" and \"foo1-dot-appname.appspot.com/v2\" can be backed by the same Serverless NEG with URL mask \"\u003cservice\u003e-dot-appname.appspot.com/\u003cversion\u003e\". The URL mask will parse them to { service = \"foo1\", version = \"v1\" } and { service = \"foo1\", version = \"v2\" } respectively.", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse service and version fields from a request URL. URL mask allows for routing to multiple App Engine services without having to create multiple Network Endpoint Groups and backend services. For example, the request URLs foo1-dot-appname.appspot.com/v1 and foo1-dot-appname.appspot.com/v2 can be backed by the same Serverless NEG with URL mask \u003cservice\u003e-dot-appname.appspot.com/\u003cversion\u003e. The URL mask will parse them to { service = \"foo1\", version = \"v1\" } and { service = \"foo1\", version = \"v2\" } respectively.", "type": "string" }, "version": { - "description": "Optional serving version. The version name is case-sensitive and must be 1-100 characters long. Example value: \"v1\", \"v2\".", + "description": "Optional serving version. The version name is case-sensitive and must be 1-100 characters long. Example value: v1, v2.", "type": "string" } }, @@ -56160,11 +56213,11 @@ "id": "NetworkEndpointGroupCloudFunction", "properties": { "function": { - "description": "A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 characters long. Example value: \"func1\".", + "description": "A user-defined name of the Cloud Function. The function name is case-sensitive and must be 1-63 characters long. Example value: func1.", "type": "string" }, "urlMask": { - "description": "A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services. For example, request URLs \" mydomain.com/function1\" and \"mydomain.com/function2\" can be backed by the same Serverless NEG with URL mask \"/\u003cfunction\u003e\". The URL mask will parse them to { function = \"function1\" } and { function = \"function2\" } respectively.", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse function field from a request URL. URL mask allows for routing to multiple Cloud Functions without having to create multiple Network Endpoint Groups and backend services. For example, request URLs mydomain.com/function1 and mydomain.com/function2 can be backed by the same Serverless NEG with URL mask /\u003cfunction\u003e. The URL mask will parse them to { function = \"function1\" } and { function = \"function2\" } respectively.", "type": "string" } }, @@ -56183,7 +56236,7 @@ "type": "string" }, "urlMask": { - "description": "A template to parse \u003cservice\u003e and \u003ctag\u003e fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services. For example, request URLs \"foo1.domain.com/bar1\" and \"foo1.domain.com/bar2\" can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask \"\u003ctag\u003e.domain.com/\u003cservice\u003e\". The URL mask will parse them to { service=\"bar1\", tag=\"foo1\" } and { service=\"bar2\", tag=\"foo2\" } respectively.", + "description": "An URL mask is one of the main components of the Cloud Function. A template to parse \u003cservice\u003e and \u003ctag\u003e fields from a request URL. URL mask allows for routing to multiple Run services without having to create multiple network endpoint groups and backend services. For example, request URLs foo1.domain.com/bar1 and foo1.domain.com/bar2 can be backed by the same Serverless Network Endpoint Group (NEG) with URL mask \u003ctag\u003e.domain.com/\u003cservice\u003e. The URL mask will parse them to { service=\"bar1\", tag=\"foo1\" } and { service=\"bar2\", tag=\"foo2\" } respectively.", "type": "string" } }, diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index 0111475f264..c9aad4ef340 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -19507,6 +19507,10 @@ func (s *InstanceGroupListWarningData) MarshalJSON() ([]byte, error) { // For regional Managed Instance Group, use the // regionInstanceGroupManagers resource. type InstanceGroupManager struct { + // AllInstancesConfig: Specifies configuration that overrides the + // instance template configuration for the group. + AllInstancesConfig *InstanceGroupManagerAllInstancesConfig `json:"allInstancesConfig,omitempty"` + // AutoHealingPolicies: The autohealing policy for this managed instance // group. You can specify only one value. AutoHealingPolicies []*InstanceGroupManagerAutoHealingPolicy `json:"autoHealingPolicies,omitempty"` @@ -19632,7 +19636,7 @@ type InstanceGroupManager struct { // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AutoHealingPolicies") + // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -19640,7 +19644,7 @@ type InstanceGroupManager struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoHealingPolicies") to + // NullFields is a list of field names (e.g. "AllInstancesConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -19950,6 +19954,39 @@ func (s *InstanceGroupManagerAggregatedListWarningData) MarshalJSON() ([]byte, e return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerAllInstancesConfig struct { + // Properties: Properties to set on all instances in the group. You can + // add or modify properties using the instanceGroupManagers.patch or + // regionInstanceGroupManagers.patch. After setting allInstancesConfig + // on the group, you must update the group's instances to apply the + // configuration. To apply the configuration, set the group's + // updatePolicy.type field to use proactive updates or use the + // applyUpdatesToInstances method. + Properties *InstancePropertiesPatch `json:"properties,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerAllInstancesConfig) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerAllInstancesConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerAutoHealingPolicy struct { // HealthCheck: The URL for the health check that signals autohealing. HealthCheck string `json:"healthCheck,omitempty"` @@ -20220,6 +20257,10 @@ func (s *InstanceGroupManagerListWarningData) MarshalJSON() ([]byte, error) { } type InstanceGroupManagerStatus struct { + // AllInstancesConfig: [Output only] Status of all-instances + // configuration on the group. + AllInstancesConfig *InstanceGroupManagerStatusAllInstancesConfig `json:"allInstancesConfig,omitempty"` + // Autoscaler: [Output Only] The URL of the Autoscaler that targets this // instance group manager. Autoscaler string `json:"autoscaler,omitempty"` @@ -20241,20 +20282,21 @@ type InstanceGroupManagerStatus struct { // Instance Group Manager. VersionTarget *InstanceGroupManagerStatusVersionTarget `json:"versionTarget,omitempty"` - // ForceSendFields is a list of field names (e.g. "Autoscaler") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AllInstancesConfig") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Autoscaler") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AllInstancesConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } @@ -20264,6 +20306,39 @@ func (s *InstanceGroupManagerStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerStatusAllInstancesConfig struct { + // CurrentRevision: [Output Only] Current all-instances configuration + // revision. This value is in RFC3339 text format. + CurrentRevision string `json:"currentRevision,omitempty"` + + // Effective: [Output Only] A bit indicating whether this configuration + // has been applied to all managed instances in the group. + Effective bool `json:"effective,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CurrentRevision") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CurrentRevision") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InstanceGroupManagerStatusAllInstancesConfig) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerStatusAllInstancesConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerStatusStateful struct { // HasStatefulConfig: [Output Only] A bit indicating whether the managed // instance group has stateful configuration, that is, if you have @@ -22576,6 +22651,41 @@ func (s *InstanceProperties) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InstancePropertiesPatch: Represents the change that you want to make +// to the instance properties. +type InstancePropertiesPatch struct { + // Labels: The label key-value pairs that you want to patch onto the + // instance. + Labels map[string]string `json:"labels,omitempty"` + + // Metadata: The metadata key-value pairs that you want to patch onto + // the instance. For more information, see Project and instance + // metadata. + Metadata map[string]string `json:"metadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Labels") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Labels") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InstancePropertiesPatch) MarshalJSON() ([]byte, error) { + type NoMethod InstancePropertiesPatch + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type InstanceReference struct { // Instance: The URL for a specific instance. @required // compute.instancegroups.addInstances/removeInstances @@ -30819,16 +30929,16 @@ type NetworkEndpointGroup struct { // group. Annotations map[string]string `json:"annotations,omitempty"` - // AppEngine: Only valid when networkEndpointType is "SERVERLESS". Only + // AppEngine: Only valid when networkEndpointType is SERVERLESS. Only // one of cloudRun, appEngine or cloudFunction may be set. AppEngine *NetworkEndpointGroupAppEngine `json:"appEngine,omitempty"` - // CloudFunction: Only valid when networkEndpointType is "SERVERLESS". + // CloudFunction: Only valid when networkEndpointType is SERVERLESS. // Only one of cloudRun, appEngine or cloudFunction may be set. CloudFunction *NetworkEndpointGroupCloudFunction `json:"cloudFunction,omitempty"` - // CloudRun: Only valid when networkEndpointType is "SERVERLESS". Only - // one of cloudRun, appEngine or cloudFunction may be set. + // CloudRun: Only valid when networkEndpointType is SERVERLESS. Only one + // of cloudRun, appEngine or cloudFunction may be set. CloudRun *NetworkEndpointGroupCloudRun `json:"cloudRun,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text @@ -30836,7 +30946,9 @@ type NetworkEndpointGroup struct { CreationTimestamp string `json:"creationTimestamp,omitempty"` // DefaultPort: The default port used if the port number is not - // specified in the network endpoint. + // specified in the network endpoint. If the network endpoint type is + // either GCE_VM_IP, SERVERLESS or PRIVATE_SERVICE_CONNECT, this field + // must not be specified. DefaultPort int64 `json:"defaultPort,omitempty"` // Description: An optional description of this resource. Provide this @@ -30861,7 +30973,7 @@ type NetworkEndpointGroup struct { Name string `json:"name,omitempty"` // Network: The URL of the network to which all network endpoints in the - // NEG belong. Uses "default" project network if unspecified. + // NEG belong. Uses default project network if unspecified. Network string `json:"network,omitempty"` // NetworkEndpointType: Type of network endpoints in this network @@ -30892,7 +31004,7 @@ type NetworkEndpointGroup struct { // PscTargetService: The target service url used to set up private // service connection to a Google API or a PSC Producer Service // Attachment. An example value is: - // "asia-northeast3-cloudkms.googleapis.com" + // asia-northeast3-cloudkms.googleapis.com PscTargetService string `json:"pscTargetService,omitempty"` // Region: [Output Only] The URL of the region where the network @@ -31145,24 +31257,23 @@ func (s *NetworkEndpointGroupAggregatedListWarningData) MarshalJSON() ([]byte, e // located in the same region as the Serverless NEG. type NetworkEndpointGroupAppEngine struct { // Service: Optional serving service. The service name is case-sensitive - // and must be 1-63 characters long. Example value: "default", - // "my-service". + // and must be 1-63 characters long. Example value: default, my-service. Service string `json:"service,omitempty"` - // UrlMask: A template to parse service and version fields from a + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse service and version fields from a // request URL. URL mask allows for routing to multiple App Engine // services without having to create multiple Network Endpoint Groups // and backend services. For example, the request URLs - // "foo1-dot-appname.appspot.com/v1" and - // "foo1-dot-appname.appspot.com/v2" can be backed by the same - // Serverless NEG with URL mask - // "-dot-appname.appspot.com/". The URL mask will - // parse them to { service = "foo1", version = "v1" } and { service = - // "foo1", version = "v2" } respectively. + // foo1-dot-appname.appspot.com/v1 and foo1-dot-appname.appspot.com/v2 + // can be backed by the same Serverless NEG with URL mask + // -dot-appname.appspot.com/. The URL mask will parse + // them to { service = "foo1", version = "v1" } and { service = "foo1", + // version = "v2" } respectively. UrlMask string `json:"urlMask,omitempty"` // Version: Optional serving version. The version name is case-sensitive - // and must be 1-100 characters long. Example value: "v1", "v2". + // and must be 1-100 characters long. Example value: v1, v2. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Service") to @@ -31195,16 +31306,17 @@ func (s *NetworkEndpointGroupAppEngine) MarshalJSON() ([]byte, error) { type NetworkEndpointGroupCloudFunction struct { // Function: A user-defined name of the Cloud Function. The function // name is case-sensitive and must be 1-63 characters long. Example - // value: "func1". + // value: func1. Function string `json:"function,omitempty"` - // UrlMask: A template to parse function field from a request URL. URL + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse function field from a request URL. URL // mask allows for routing to multiple Cloud Functions without having to // create multiple Network Endpoint Groups and backend services. For - // example, request URLs " mydomain.com/function1" and - // "mydomain.com/function2" can be backed by the same Serverless NEG - // with URL mask "/". The URL mask will parse them to { - // function = "function1" } and { function = "function2" } respectively. + // example, request URLs mydomain.com/function1 and + // mydomain.com/function2 can be backed by the same Serverless NEG with + // URL mask /. The URL mask will parse them to { function = + // "function1" } and { function = "function2" } respectively. UrlMask string `json:"urlMask,omitempty"` // ForceSendFields is a list of field names (e.g. "Function") to @@ -31247,12 +31359,13 @@ type NetworkEndpointGroupCloudRun struct { // "revision-0010". Tag string `json:"tag,omitempty"` - // UrlMask: A template to parse and fields from a + // UrlMask: An URL mask is one of the main components of the Cloud + // Function. A template to parse and fields from a // request URL. URL mask allows for routing to multiple Run services // without having to create multiple network endpoint groups and backend - // services. For example, request URLs "foo1.domain.com/bar1" and - // "foo1.domain.com/bar2" can be backed by the same Serverless Network - // Endpoint Group (NEG) with URL mask ".domain.com/". The + // services. For example, request URLs foo1.domain.com/bar1 and + // foo1.domain.com/bar2 can be backed by the same Serverless Network + // Endpoint Group (NEG) with URL mask .domain.com/. The // URL mask will parse them to { service="bar1", tag="foo1" } and { // service="bar2", tag="foo2" } respectively. UrlMask string `json:"urlMask,omitempty"` diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index aa5a6ca26fc..a4ee876594c 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -1505,6 +1505,101 @@ }, "servingConfigs": { "methods": { + "get": { + "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all ServingConfigs linked to this dataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/servingConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1alpha/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}/dataStores/{data_store_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": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -2732,6 +2827,101 @@ }, "servingConfigs": { "methods": { + "get": { + "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all ServingConfigs linked to this dataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/servingConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1alpha/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}/dataStores/{data_store_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": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", @@ -3938,6 +4128,101 @@ }, "servingConfigs": { "methods": { + "get": { + "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all ServingConfigs linked to this dataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/servingConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1alpha/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}/dataStores/{data_store_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": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -4596,7 +4881,7 @@ } } }, - "revision": "20240129", + "revision": "20240206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6060,6 +6345,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec": { + "description": "Defines custom fine tuning spec.", + "id": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "properties": { + "enableSearchAdaptor": { + "description": "Whether or not to enable and include custom fine tuned search adaptor model.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDataStore": { "description": "DataStore captures global settings and configs at the DataStore level.", "id": "GoogleCloudDiscoveryengineV1alphaDataStore", @@ -6398,6 +6694,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig": { + "description": "Defines embedding config, used for bring your own embeddings feature.", + "id": "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig", + "properties": { + "fieldPath": { + "description": "Full field path in the schema mapped as embedding field.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", @@ -6980,6 +7287,26 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec": { + "description": "Defines guided search spec.", + "id": "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec", + "properties": { + "enableRefinementAttributes": { + "description": "Whether or not to enable and include refinement attributes in gudied search result.", + "type": "boolean" + }, + "enableRelatedQuestions": { + "description": "Whether or not to enable and include related questions in search response.", + "type": "boolean" + }, + "maxRelatedQuestions": { + "description": "Max number of related questions to be returned. The valid range is [1, 5]. If enable_related_questions is true, the default value is 3.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", @@ -7380,6 +7707,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse": { + "description": "Response for ListServingConfigs method.", + "id": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + }, + "servingConfigs": { + "description": "All the ServingConfigs for a given dataStore.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse": { "description": "Response message for SiteSearchEngineService.ListTargetSites method.", "id": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse", @@ -8268,7 +8613,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec", "properties": { "version": { - "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned version of the text-bison@001 model. * `preview`: string. (Public preview) Uses a fine-tuned version of the text-bison@002 model. This model works only for summaries in English.", + "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 version of the text-bison@001 model. LINT.IfChange * `preview`: string. (Public preview) Uses a fine-tuned version of the text-bison@002 model. This model works only for summaries in English. LINT.ThenChange(//depot/google3/cloud/console/web/ai/unified_cloud_search/pages/configurations/widget_tab.ts)", "type": "string" } }, @@ -8790,6 +9135,179 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaServingConfig": { + "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfig", + "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" + }, + "customFineTuningSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", + "description": "Custom fine tuning configs." + }, + "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" + }, + "embeddingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEmbeddingConfig", + "description": "Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config." + }, + "filterControlIds": { + "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "guidedSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec", + "description": "Guided search configs." + }, + "ignoreControlIds": { + "description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mediaConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig", + "description": "The MediaConfig of the serving configuration." + }, + "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}/dataStores/{data_store_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" + }, + "rankingExpression": { + "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" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "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" + }, + "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig", + "properties": { + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig": { + "description": "Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "id": "GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig", + "properties": { + "contentFreshnessCutoffDays": { + "description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.", + "format": "int32", + "type": "integer" + }, + "contentWatchedMinutesThreshold": { + "deprecated": true, + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demotionEventType": { + "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine": { "description": "SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store.", "id": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 1fd6500f77c..6ed2a18e251 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -3352,6 +3352,37 @@ func (s *GoogleCloudDiscoveryengineV1alphaCustomAttribute) UnmarshalJSON(data [] return nil } +// GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec: Defines custom +// fine tuning spec. +type GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec struct { + // EnableSearchAdaptor: Whether or not to enable and include custom fine + // tuned search adaptor model. + EnableSearchAdaptor bool `json:"enableSearchAdaptor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EnableSearchAdaptor") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnableSearchAdaptor") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global // settings and configs at the DataStore level. type GoogleCloudDiscoveryengineV1alphaDataStore struct { @@ -3940,6 +3971,35 @@ func (s *GoogleCloudDiscoveryengineV1alphaDoubleList) UnmarshalJSON(data []byte) return nil } +// GoogleCloudDiscoveryengineV1alphaEmbeddingConfig: Defines embedding +// config, used for bring your own embeddings feature. +type GoogleCloudDiscoveryengineV1alphaEmbeddingConfig struct { + // FieldPath: Full field path in the schema mapped as embedding field. + FieldPath string `json:"fieldPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaEmbeddingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEmbeddingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will @@ -4954,6 +5014,47 @@ func (s *GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec: Defines guided +// search spec. +type GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec struct { + // EnableRefinementAttributes: Whether or not to enable and include + // refinement attributes in gudied search result. + EnableRefinementAttributes bool `json:"enableRefinementAttributes,omitempty"` + + // EnableRelatedQuestions: Whether or not to enable and include related + // questions in search response. + EnableRelatedQuestions bool `json:"enableRelatedQuestions,omitempty"` + + // MaxRelatedQuestions: Max number of related questions to be returned. + // The valid range is [1, 5]. If enable_related_questions is true, the + // default value is 3. + MaxRelatedQuestions int64 `json:"maxRelatedQuestions,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableRefinementAttributes") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "EnableRefinementAttributes") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata // related to the progress of the ImportDocuments operation. This is // returned by the google.longrunning.Operation.metadata field. @@ -5725,6 +5826,43 @@ func (s *GoogleCloudDiscoveryengineV1alphaListSchemasResponse) MarshalJSON() ([] return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse: Response +// for ListServingConfigs method. +type GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServingConfigs: All the ServingConfigs for a given dataStore. + ServingConfigs []*GoogleCloudDiscoveryengineV1alphaServingConfig `json:"servingConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse: Response // message for SiteSearchEngineService.ListTargetSites method. type GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse struct { @@ -7489,9 +7627,11 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecM // 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 version of the - // text-bison@001 model. * `preview`: string. (Public preview) Uses a - // fine-tuned version of the text-bison@002 model. This model works only - // for summaries in English. + // text-bison@001 model. LINT.IfChange * `preview`: string. (Public + // preview) Uses a fine-tuned version of the text-bison@002 model. This + // model works only for summaries in English. + // LINT.ThenChange(//depot/google3/cloud/console/web/ai/unified_cloud_sea + // rch/pages/configurations/widget_tab.ts) Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Version") to @@ -8469,6 +8609,268 @@ func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetada return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaServingConfig: 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 GoogleCloudDiscoveryengineV1alphaServingConfig 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"` + + // CustomFineTuningSpec: Custom fine tuning configs. + CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + + // DisplayName: Required. The human readable serving config display + // name. Used in Discovery UI. This field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DissociateControlIds: Condition do not associate specifications. If + // multiple do not associate conditions match, all matching do not + // associate controls in the list will execute. Order does not matter. + // Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + + // DiversityLevel: How much diversity to use in recommendation model + // results e.g. `medium-diversity` or `high-diversity`. Currently + // supported values: * `no-diversity` * `low-diversity` * + // `medium-diversity` * `high-diversity` * `auto-diversity` If not + // specified, we choose default based on recommendation model type. + // Default value: `no-diversity`. Can only be set if SolutionType is + // SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + + // EmbeddingConfig: Bring your own embedding config. The config is used + // for search semantic retrieval. The retrieval is based on the dot + // product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the + // document embeddings that are provided by this EmbeddingConfig. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it + // overrides this ServingConfig.embedding_config. + EmbeddingConfig *GoogleCloudDiscoveryengineV1alphaEmbeddingConfig `json:"embeddingConfig,omitempty"` + + // FilterControlIds: Filter controls to use in serving path. All + // triggered filter controls will be applied. Filter controls must be in + // the same data store as the serving config. Maximum of 20 filter + // controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig `json:"genericConfig,omitempty"` + + // GuidedSearchSpec: Guided search configs. + GuidedSearchSpec *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec `json:"guidedSearchSpec,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 *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig `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}/d + // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. + // If multiple oneway synonyms conditions match, all matching oneway + // synonyms controls in the list will execute. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + + RankingExpression 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. + 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig: +// Specifies the configurations needed for Generic Discovery.Currently +// we support: * `content_search_spec`: configuration for generic +// content search. +type GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. + // Only valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig: 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 GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig 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"` + + // ContentWatchedMinutesThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedMinutesThreshold float64 `json:"contentWatchedMinutesThreshold,omitempty"` + + // ContentWatchedPercentageThreshold: Specifies the content watched + // percentage threshold for demotion. Threshold value must be between + // [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + + // DemotionEventType: Specifies the event type used for demoting + // recommendation result. Currently supported values: * `view-item`: + // Item viewed. * `media-play`: Start/resume watching a video, playing a + // song, etc. * `media-complete`: Finished or stopped midway through a + // video, song, etc. If unset, watch history demotion will not be + // applied. Content freshness demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContentFreshnessCutoffDays") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + 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. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig + var s1 struct { + ContentWatchedMinutesThreshold gensupport.JSONFloat64 `json:"contentWatchedMinutesThreshold"` + 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.ContentWatchedMinutesThreshold = float64(s1.ContentWatchedMinutesThreshold) + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + // GoogleCloudDiscoveryengineV1alphaSiteSearchEngine: SiteSearchEngine // captures DataStore level site search persisting configurations. It is // a singleton value per data store. @@ -18645,102 +19047,100 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages( } } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get": -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18759,7 +19159,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18771,28 +19171,25 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18801,99 +19198,116 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list": -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists all ServingConfigs linked to this dataStore. // -// - servingConfig: 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/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - parent: The dataStore resource name. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// will be non-nil. 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 -// +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18912,7 +19326,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18924,28 +19338,36 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "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/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" - // }, + // "path": "v1alpha/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18957,9 +19379,9 @@ 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -18971,40 +19393,47 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchVerifyTargetSites: Verify target sites' ownership and validity. -// This API sends all the target sites under site search engine for -// verification. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - parent: The parent resource shared by all TargetSites being -// verified. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest = googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19012,21 +19441,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19034,34 +19463,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19080,7 +19511,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19092,28 +19523,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } return ret, nil // { - // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "name": { + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "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": "v1alpha/{+parent}:batchVerifyTargetSites", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19122,35 +19559,43 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to -// basic site search. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19158,21 +19603,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19180,14 +19625,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19195,19 +19640,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19226,7 +19673,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19238,28 +19685,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } return ret, nil // { - // "description": "Downgrade from advanced site search to basic site search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "siteSearchEngine" + // "servingConfig" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch", + // "path": "v1alpha/{+servingConfig}:recommend", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19268,35 +19715,38 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced -// site search. +// Search: Performs a search. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// - servingConfig: The resource name of the Search serving config, such // as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19304,21 +19754,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19326,14 +19776,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19341,19 +19791,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or +// error will be non-nil. 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19372,7 +19826,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19384,28 +19838,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } return ret, nil // { - // "description": "Upgrade from basic site search to advanced site search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", // "parameterOrder": [ - // "siteSearchEngine" + // "servingConfig" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch", + // "path": "v1alpha/{+servingConfig}:search", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19414,123 +19868,114 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point + 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchDomainVerificationStatus: Returns list of target sites with its -// domain verification status. This method can only be called under data -// store with BASIC_SITE_SEARCH state at the moment. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. +// This API sends all the target sites under site search engine for +// verification. // -// - siteSearchEngine: The site search engine resource under which we -// fetch all the domain verification status. +// - parent: The parent resource shared by all TargetSites being +// verified. // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `FetchDomainVerificationStatus` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `FetchDomainVerificationStatus` must -// match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.urlParams_.Set("pageToken", pageToken) +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest = googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:batchVerifyTargetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons -// e or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons -// e.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19549,7 +19994,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19561,36 +20006,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } return ret, nil // { - // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", + // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", // "parameterOrder": [ - // "siteSearchEngine" + // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "siteSearchEngine": { - // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus", + // "path": "v1alpha/{+parent}:batchVerifyTargetSites", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19599,55 +20036,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to +// basic site search. // // - siteSearchEngine: Full resource name of the SiteSearchEngine, such // as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` -// . -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest + c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19655,21 +20072,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19677,14 +20094,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19697,14 +20114,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19735,25 +20152,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } return ret, nil // { - // "description": "Request on-demand recrawl for a list of URIs.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "description": "Downgrade from advanced site search to basic site search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", // "parameterOrder": [ // "siteSearchEngine" // ], // "parameters": { // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:recrawlUris", + // "path": "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -19765,97 +20182,92 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced +// site search. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19886,23 +20298,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", + // "description": "Upgrade from basic site search to advanced site search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -19913,45 +20328,47 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { + s *Service + siteSearchEngine string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// FetchDomainVerificationStatus: Returns list of target sites with its +// domain verification status. This method can only be called under data +// store with BASIC_SITE_SEARCH state at the moment. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) +// - siteSearchEngine: The site search engine resource under which we +// fetch all the domain verification status. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. The maximum value is 1000; values +// above 1000 will be coerced to 1000. If this field is negative, an +// INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `FetchDomainVerificationStatus` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `FetchDomainVerificationStatus` must +// match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -19959,7 +20376,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19969,7 +20386,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ifNoneMatch_ = entityTag return c } @@ -19977,21 +20394,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20004,7 +20421,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20012,20 +20429,22 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons +// e or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons +// e.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20044,7 +20463,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20056,41 +20475,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", + // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "siteSearchEngine": { + // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20102,7 +20516,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -20120,36 +20534,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - parent: The parent resource shared by all TargetSites being -// created. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this -// field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` +// . +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20157,21 +20569,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20179,14 +20591,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecrawlurisrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:recrawlUris") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20194,19 +20606,19 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20237,25 +20649,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } return ret, nil // { - // "description": "Creates TargetSite in a batch.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "description": "Request on-demand recrawl for a list of URIs.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", // "parameterOrder": [ - // "parent" + // "siteSearchEngine" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/targetSites:batchCreate", + // "path": "v1alpha/{+siteSearchEngine}:recrawlUris", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -20267,90 +20679,97 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20381,26 +20800,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } return ret, nil // { - // "description": "Creates a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/targetSites", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -20411,69 +20827,100 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a TargetSite. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20484,14 +20931,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20510,7 +20958,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20522,25 +20970,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } return ret, nil // { - // "description": "Deletes a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20549,103 +21013,114 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a TargetSite. +// BatchCreate: Creates TargetSite in a batch. // -// - name: Full resource name of TargetSite, such as +// - parent: The parent resource shared by all TargetSites being +// created. // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this +// field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaTargetSite or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20664,7 +21139,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20676,25 +21151,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } return ret, nil // { - // "description": "Gets a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", + // "description": "Creates TargetSite in a batch.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/targetSites:batchCreate", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20703,102 +21181,72 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of TargetSites. +// Create: Creates a TargetSite. // -// - parent: The parent site search engine resource name, such as +// - parent: Parent resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to list TargetSites under this site search engine, -// regardless of whether or not this branch exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListTargetSites` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListTargetSites` must match the call that provided the -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20809,17 +21257,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.ServerRespon -// se.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20838,7 +21283,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20850,27 +21295,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } return ret, nil // { - // "description": "Gets a list of TargetSites.", + // "description": "Creates a TargetSite.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, @@ -20878,8 +21312,11 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // } // }, // "path": "v1alpha/{+parent}/targetSites", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20888,56 +21325,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Delete: Deletes a TargetSite. // -// - name: Output only. The fully qualified resource name of the target -// site. +// - name: Full resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` -// The `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20945,21 +21361,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20967,16 +21383,11 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20987,14 +21398,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21025,16 +21436,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } return ret, nil // { - // "description": "Updates a TargetSite.", + // "description": "Deletes a TargetSite.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, @@ -21042,9 +21453,6 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" - // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -21055,9 +21463,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21066,13 +21474,17 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a TargetSite. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21080,7 +21492,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21090,7 +21502,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21098,21 +21510,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21138,14 +21550,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaTargetSite or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21164,7 +21578,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21176,25 +21590,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "description": "Gets a TargetSite.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21203,45 +21617,47 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Gets a list of TargetSites. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to list TargetSites under this site search engine, +// regardless of whether or not this branch exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. The maximum value is 1000; values +// above 1000 will be coerced to 1000. If this field is negative, an +// INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListTargetSites` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListTargetSites` must match the call that provided the // page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21249,7 +21665,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21259,7 +21675,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ifNoneMatch_ = entityTag return c } @@ -21267,21 +21683,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21294,7 +21710,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21302,20 +21718,22 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.ServerRespon +// se.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21334,7 +21752,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21346,41 +21764,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", + // "description": "Gets a list of TargetSites.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/targetSites", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21392,7 +21805,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -21410,33 +21823,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } } -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Patch: Updates a TargetSite. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest +// - name: Output only. The fully qualified resource name of the target +// site. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` +// The `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21444,21 +21859,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21466,34 +21881,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21524,25 +21939,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } return ret, nil // { - // "description": "Imports all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", + // "description": "Updates a TargetSite.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/suggestionDenyListEntries:import", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -21554,91 +21969,97 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a -// DataStore. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21669,26 +22090,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } return ret, nil // { - // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/suggestionDenyListEntries:purge", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -21699,60 +22117,53 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party -// domain. This method is used only by the Discovery Engine API -// JavaScript pixel and Google Tag Manager. Users should not call this -// method directly. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Ets sets the optional parameter "ets": The event timestamp in -// milliseconds. This prevents browser caching of otherwise identical -// get requests. The name is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// Uri sets the optional parameter "uri": The URL including -// cgi-parameters but excluding the hash fragment with a length limit of -// 5,000 characters. This is often more useful than the referer URL, -// because many browsers only send the domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UserEvent sets the optional parameter "userEvent": Required. URL -// encoded UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21762,7 +22173,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s . // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -21770,21 +22181,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21797,7 +22208,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21805,19 +22216,20 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21836,7 +22248,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21848,41 +22260,41 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } return ret, nil // { - // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "ets": { - // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - // "format": "int64", + // "filter": { + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", // "required": true, // "type": "string" // }, - // "uri": { - // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "userEvent": { - // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:collect", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21891,38 +22303,54 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": + +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of User events. Request processing might be -// synchronous. Events that already exist are skipped. Use this method -// for backfilling historical user events. Operation.response is of type -// ImportResponse. Note that it is possible for a subset of the items to -// be successfully inserted. Operation.metadata is of type -// ImportMetadata. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest + c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21930,21 +22358,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21952,14 +22380,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21972,14 +22400,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22010,25 +22438,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } return ret, nil // { - // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "description": "Imports all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:import", + // "path": "v1alpha/{+parent}/suggestionDenyListEntries:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -22040,37 +22468,34 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": -type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Deletes permanently all user events specified by the filter -// provided. Depending on the number of events specified by the filter, -// this operation could take hours or days to complete. To test a -// filter, use the list command first. +// Purge: Permanently deletes all SuggestionDenyListEntry for a +// DataStore. // -// - parent: The resource name of the catalog under which the events are -// created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/ -// dataStores/${dataStoreId}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest + c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22078,21 +22503,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22100,14 +22525,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22120,14 +22545,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22158,25 +22583,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g } return ret, nil // { - // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:purge", + // "path": "v1alpha/{+parent}/suggestionDenyListEntries:purge", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -22188,72 +22613,107 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party +// domain. This method is used only by the Discovery Engine API +// JavaScript pixel and Google Tag Manager. Users should not call this +// method directly. // // - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in +// milliseconds. This prevents browser caching of otherwise identical +// get requests. The name is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphauserevent) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -22264,16 +22724,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22292,7 +22750,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22304,28 +22762,41 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } return ret, nil // { - // "description": "Writes a single user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", + // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + // "location": "query", + // "type": "string" + // }, + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:write", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" - // }, + // "path": "v1alpha/{+parent}/userEvents:collect", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22334,42 +22805,38 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.create": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Engine. +// Import: Bulk import of User events. Request processing might be +// synchronous. Events that already exist are skipped. Use this method +// for backfilling historical user events. Operation.response is of type +// ImportResponse. Note that it is possible for a subset of the items to +// be successfully inserted. Operation.metadata is of type +// ImportMetadata. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine - return c -} - -// EngineId sets the optional parameter "engineId": Required. The ID to -// use for the Engine, which will become the final component of the -// Engine's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { - c.urlParams_.Set("engineId", engineId) + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22377,21 +22844,21 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22399,14 +22866,14 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22419,14 +22886,14 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22457,30 +22924,25 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a Engine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.create", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "engineId": { - // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/engines", + // "path": "v1alpha/{+parent}/userEvents:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -22492,34 +22954,37 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": -type ProjectsLocationsCollectionsEnginesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Engine. +// Purge: Deletes permanently all user events specified by the filter +// provided. Depending on the number of events specified by the filter, +// this operation could take hours or days to complete. To test a +// filter, use the list command first. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}`. If the caller does not have permission to -// delete the Engine, regardless of whether or not it exists, a -// PERMISSION_DENIED error is returned. If the Engine to delete does -// not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/ +// dataStores/${dataStoreId}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22527,21 +22992,21 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22549,29 +23014,34 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22602,23 +23072,26 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a Engine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.delete", + // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", + // "parent": { + // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userEvents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -22629,98 +23102,92 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.get": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": -type ProjectsLocationsCollectionsEnginesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Engine. +// Write: Writes a single user event. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphauserevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22739,7 +23206,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22751,25 +23218,28 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a Engine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.get", + // "description": "Writes a single user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userEvents:write", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22778,98 +23248,81 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } -// method id "discoveryengine.projects.locations.collections.engines.list": +// method id "discoveryengine.projects.locations.collections.engines.create": -type ProjectsLocationsCollectionsEnginesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the Engines associated with the project. +// Create: Creates a Engine. // // - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// `. -func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { - c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine return c } -// Filter sets the optional parameter "filter": Filter by solution type. -// For example: solution_type=SOLUTION_TYPE_SEARCH -func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageToken", pageToken) +// EngineId sets the optional parameter "engineId": Required. The ID to +// use for the Engine, which will become the final component of the +// Engine's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22880,16 +23333,14 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListEnginesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.ServerResponse.H -// eader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22908,7 +23359,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22920,32 +23371,21 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists all the Engines associated with the project.", + // "description": "Creates a Engine.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.list", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Not supported.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Not supported.", + // "engineId": { + // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, @@ -22953,8 +23393,11 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO // } // }, // "path": "v1alpha/{+parent}/engines", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22963,66 +23406,34 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.patch": +// method id "discoveryengine.projects.locations.collections.engines.delete": -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Delete: Deletes a Engine. // -// - name: Immutable. The fully qualified resource name of the engine. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}` engine should be 1-63 characters, and valid -// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. If the caller does not have permission to +// delete the Engine, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the Engine to delete does +// not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Engine to update. If an unsupported or unknown -// field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23030,21 +23441,21 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23052,16 +23463,11 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -23072,15 +23478,14 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23099,7 +23504,7 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23111,34 +23516,25 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates an Engine", + // "description": "Deletes a Engine.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.patch", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.engines.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23147,73 +23543,79 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.pause": +// method id "discoveryengine.projects.locations.collections.engines.get": -type ProjectsLocationsCollectionsEnginesPauseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Pause: Pauses the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// Get: Gets a Engine. // -// - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { - c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapauseenginerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:pause") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -23224,7 +23626,7 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. // Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -23232,7 +23634,7 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*h // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23263,26 +23665,23 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Pauses the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.pause", + // "description": "Gets a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:pause", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, @@ -23293,92 +23692,118 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.resume": +// method id "discoveryengine.projects.locations.collections.engines.list": -type ProjectsLocationsCollectionsEnginesResumeCall struct { - s *Service - name string - googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Resume: Resumes the training of an existing engine. Only applicable -// if SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// List: Lists all the Engines associated with the project. // -// - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { - c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { + 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 information. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharesumeenginerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListEnginesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23397,7 +23822,7 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23409,28 +23834,41 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Resumes the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.resume", + // "description": "Lists all the Engines associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "filter": { + // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Not supported.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Not supported.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:resume", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest" - // }, + // "path": "v1alpha/{+parent}/engines", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23439,34 +23877,66 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.tune": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsEnginesTuneCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.patch": + +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Tune: Tunes an existing engine. Only applicable if SolutionType is -// SOLUTION_TYPE_RECOMMENDATION. +// Patch: Updates an Engine // -// - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { - c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The fully qualified resource name of the engine. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}` engine should be 1-63 characters, and valid +// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Engine to update. If an unsupported or unknown +// field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23474,21 +23944,21 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23496,16 +23966,16 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatuneenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:tune") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -23516,14 +23986,15 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23542,7 +24013,7 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23554,28 +24025,34 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Tunes an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.tune", + // "description": "Updates an Engine", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}:tune", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23584,38 +24061,34 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO } -// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": +// method id "discoveryengine.projects.locations.collections.engines.pause": -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPauseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Pause: Pauses the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use +// - name: The name of the engine to pause. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest + c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23623,21 +24096,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23645,14 +24118,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapauseenginerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:pause") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23665,17 +24138,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR -// esponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23694,7 +24165,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23706,28 +24177,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", + // "description": "Pauses the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", + // "id": "discoveryengine.projects.locations.collections.engines.pause", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:converse", + // "path": "v1alpha/{+name}:pause", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23736,34 +24207,34 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.engines.conversations.create": +// method id "discoveryengine.projects.locations.collections.engines.resume": -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Resume: Resumes the training of an existing engine. Only applicable +// if SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - parent: Full resource name of parent data store. Format: +// - name: The name of the engine to resume. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { + c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23771,21 +24242,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23793,14 +24264,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharesumeenginerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23808,21 +24279,20 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23841,7 +24311,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23853,28 +24323,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "description": "Resumes the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", + // "id": "discoveryengine.projects.locations.collections.engines.resume", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+name}:resume", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23883,32 +24353,34 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": +// method id "discoveryengine.projects.locations.collections.engines.tune": -type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// Tune: Tunes an existing engine. Only applicable if SolutionType is +// SOLUTION_TYPE_RECOMMENDATION. // -// - name: The resource name of the Conversation to delete. Format: +// - name: The resource name of the engine to tune. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23916,21 +24388,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23938,11 +24410,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatuneenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:tune") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -23953,14 +24430,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23979,7 +24456,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23991,25 +24468,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", + // "description": "Tunes an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.tune", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:tune", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24018,79 +24498,77 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.get": +// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -24101,16 +24579,17 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR +// esponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24129,7 +24608,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24141,25 +24620,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", + // "description": "Converses a conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24168,113 +24650,73 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.engines.conversations.list": +// method id "discoveryengine.projects.locations.collections.engines.conversations.create": -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The data store resource name. Format: +// - parent: Full resource name of parent data store. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -24285,17 +24727,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp -// onse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24314,7 +24755,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24326,37 +24767,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.list", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, @@ -24364,8 +24784,11 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // } // }, // "path": "v1alpha/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24374,67 +24797,32 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": +// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24442,21 +24830,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24464,16 +24852,11 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -24484,16 +24867,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24512,7 +24893,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24524,34 +24905,25 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24560,9 +24932,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.conversations.get": -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24571,13 +24943,13 @@ type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a Conversation. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24585,7 +24957,7 @@ func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24595,7 +24967,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -24603,21 +24975,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24643,14 +25015,16 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24669,7 +25043,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24681,25 +25055,25 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "description": "Gets a Conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.get", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24708,45 +25082,58 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.engines.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.conversations.list": -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesConversationsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists all Conversations by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24754,7 +25141,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24764,7 +25151,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -24772,21 +25159,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24799,7 +25186,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24807,20 +25194,22 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24839,7 +25228,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24851,41 +25240,46 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.list", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", - // "required": true, + // "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` * `conversation_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/conversations", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24897,7 +25291,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -24915,43 +25309,46 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx contex } } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24959,21 +25356,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24981,36 +25378,36 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25029,7 +25426,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25041,28 +25438,34 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25071,99 +25474,97 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": +// method id "discoveryengine.projects.locations.collections.engines.operations.get": -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - servingConfig: 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/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25182,7 +25583,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25194,28 +25595,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.operations.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "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/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25224,178 +25622,9 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point - 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 - } -} - -// method id "discoveryengine.projects.locations.collections.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.operations.list": -type ProjectsLocationsCollectionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The name of the operation resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleLongrunningOperation" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.operations.list": - -type ProjectsLocationsCollectionsOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -25409,29 +25638,29 @@ type ProjectsLocationsCollectionsOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { - c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -25439,7 +25668,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25449,7 +25678,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -25457,21 +25686,21 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25497,7 +25726,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -25505,7 +25734,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25537,9 +25766,9 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.list", + // "id": "discoveryengine.projects.locations.collections.engines.operations.list", // "parameterOrder": [ // "name" // ], @@ -25552,7 +25781,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // }, @@ -25582,7 +25811,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -25600,83 +25829,33 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Conte } } -// method id "discoveryengine.projects.locations.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.get": -type ProjectsLocationsDataStoresCompleteQueryCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { s *Service - dataStore string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions -// generated from the past history of SearchService.Search API calls. Do -// not use it when there is no traffic for Search API. * `user-event` - -// Using suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c -} - -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25686,7 +25865,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -25694,21 +25873,21 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25721,7 +25900,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25729,22 +25908,21 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25763,7 +25941,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25775,45 +25953,25 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", // "parameterOrder": [ - // "dataStore" + // "name" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "name": { + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", - // "location": "query", - // "type": "boolean" - // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", - // "location": "query", - // "type": "string" - // }, - // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", - // "location": "query", - // "type": "string" - // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+dataStore}:completeQuery", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25822,93 +25980,95 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.create": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.list": -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To -// serve these documents for Search, or Recommendation use case, an -// Engine needs to be created separately. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The dataStore resource name. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user -// want to directly create an advanced data store for site search. If -// the data store is not configured as site search (GENERIC vertical and -// PUBLIC_WEBSITE content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// DataStoreId sets the optional parameter "dataStoreId": Required. The -// ID to use for the DataStore, which will become the final component of -// the DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -25919,14 +26079,17 @@ func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25945,7 +26108,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25957,38 +26120,36 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.create", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "createAdvancedSiteSearch": { - // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", // "location": "query", - // "type": "boolean" + // "type": "integer" // }, - // "dataStoreId": { - // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStores", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" - // }, + // "path": "v1alpha/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25997,34 +26158,64 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.patch": + +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: Full resource name of DataStore, such as +// - name: Immutable. Fully qualified name // `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to delete the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the DataStore to -// delete does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /dataStores/{data_store_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26032,21 +26223,21 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26054,11 +26245,16 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -26069,14 +26265,16 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26095,7 +26293,7 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26107,25 +26305,34 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.delete", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/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": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "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": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26134,102 +26341,102 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.get": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": -type ProjectsLocationsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to access the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the requested -// DataStore does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26248,7 +26455,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26260,25 +26467,28 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.get", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26287,100 +26497,99 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": -type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +// Search: Performs a search. // -// - name: Full DocumentProcessingConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/dataStores/{data_store_id}/documentProcessingConfig`. -func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { - c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: 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/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo -// nse.Header or (if a response was returned at all) in +// *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 *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26399,7 +26608,7 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26411,25 +26620,28 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... } return ret, nil // { - // "description": "Gets a DocumentProcessingConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:search", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26438,9 +26650,30 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... } -// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point + 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 ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { +// method id "discoveryengine.projects.locations.collections.operations.get": + +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26449,15 +26682,13 @@ type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to access the [SiteSearchEngine], regardless of -// whether or not it exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26465,7 +26696,7 @@ func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26475,7 +26706,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -26483,21 +26714,21 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26523,19 +26754,17 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { res.Body.Close() } @@ -26551,7 +26780,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26563,25 +26792,25 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the SiteSearchEngine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", + // "id": "discoveryengine.projects.locations.collections.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26590,53 +26819,45 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.list": +// method id "discoveryengine.projects.locations.collections.operations.list": -type ProjectsLocationsDataStoresListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// `. If the caller does not have permission to list DataStores under -// this location, regardless of whether or not this data store exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { - c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": Filter by solution type. -// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' -func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum -// allowed value is 50. Values above 50 will be coerced to 50. If this -// field is negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the -// page token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -26644,7 +26865,7 @@ func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26654,7 +26875,7 @@ func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -26662,21 +26883,21 @@ func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26689,7 +26910,7 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26697,22 +26918,20 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons -// e.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26731,7 +26950,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26743,41 +26962,41 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all the DataStores associated with the project.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.list", + // "id": "discoveryengine.projects.locations.collections.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { // "filter": { - // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // }, // "pageSize": { - // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStores", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26789,7 +27008,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { +func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -26807,101 +27026,151 @@ func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func( } } -// method id "discoveryengine.projects.locations.dataStores.patch": +// method id "discoveryengine.projects.locations.dataStores.completeQuery": -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// CompleteQuery: Completes the specified user input with keyword +// suggestions. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DataStore to update. If an unsupported or -// unknown field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions +// generated from the past history of SearchService.Search API calls. Do +// not use it when there is no traffic for Search API. * `user-event` - +// Using suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse +// .Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26920,7 +27189,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26932,34 +27201,45 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a DataStore", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.patch", + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.completeQuery", // "parameterOrder": [ - // "name" + // "dataStore" // ], // "parameters": { - // "name": { - // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "location": "query", + // "type": "boolean" + // }, + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" - // }, + // "path": "v1alpha/{+dataStore}:completeQuery", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26968,47 +27248,54 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig": +// method id "discoveryengine.projects.locations.dataStores.create": -type ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. -// DocumentProcessingConfig is a singleon resource of DataStore. It's -// empty when DataStore is created. The first call to this method will -// set up DocumentProcessingConfig. +// Create: Creates a DataStore. DataStore is for storing Documents. To +// serve these documents for Search, or Recommendation use case, an +// Engine needs to be created separately. // -// - name: The full resource name of the Document Processing Config. -// Format: -// `projects/*/locations/*/collections/*/dataStores/*/documentProcessin -// gConfig`. -func (r *ProjectsLocationsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { - c := &ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DocumentProcessingConfig to update. The -// following are the only supported fields: * -// DocumentProcessingConfig.ocr_config If not set, all supported fields -// are updated. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { - c.urlParams_.Set("updateMask", updateMask) +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27016,21 +27303,21 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27038,37 +27325,34 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo -// nse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27087,7 +27371,7 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27099,34 +27383,38 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts } return ret, nil // { - // "description": "Updates the DocumentProcessingConfig. DocumentProcessingConfig is a singleon resource of DataStore. It's empty when DataStore is created. The first call to this method will set up DocumentProcessingConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig", + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", - // "required": true, - // "type": "string" + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DocumentProcessingConfig to update. The following are the only supported fields: * DocumentProcessingConfig.ocr_config If not set, all supported fields are updated.", - // "format": "google-fieldmask", + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/dataStores", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27135,48 +27423,34 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": +// method id "discoveryengine.projects.locations.dataStores.delete": -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// Delete: Deletes a DataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument - return c -} - -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27184,21 +27458,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27206,36 +27480,29 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27254,7 +27521,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27266,33 +27533,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } return ret, nil // { - // "description": "Creates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + // "description": "Deletes a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27301,27 +27560,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": +// method id "discoveryengine.projects.locations.dataStores.get": -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. +// Get: Gets a DataStore. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27329,41 +27588,54 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -27374,14 +27646,16 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27400,7 +27674,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27412,25 +27686,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "description": "Gets a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27439,9 +27713,9 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig": -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27450,17 +27724,13 @@ type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { header_ http.Header } -// Get: Gets a Document. +// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full DocumentProcessingConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/dataStores/{data_store_id}/documentProcessingConfig`. +func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { + c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27468,7 +27738,7 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27478,7 +27748,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -27486,21 +27756,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27526,16 +27796,17 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// Do executes the "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo +// nse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27554,7 +27825,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27566,25 +27837,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "description": "Gets a DocumentProcessingConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + // "id": "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27593,93 +27864,101 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": +// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. +// GetSiteSearchEngine: Gets the SiteSearchEngine. // -// - parent: The parent branch resource name, such as +// - name: Resource name of SiteSearchEngine, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to access the [SiteSearchEngine], regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportdocumentsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27698,7 +27977,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27710,28 +27989,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "description": "Gets the SiteSearchEngine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "name": { + // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27740,9 +28016,9 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.dataStores.list": -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsDataStoresListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -27751,37 +28027,42 @@ type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { header_ http.Header } -// List: Gets a list of Documents. +// List: Lists all the DataStores associated with the project. // // - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStores under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum number of -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the // subsequent page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the -// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27789,7 +28070,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27799,7 +28080,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { c.ifNoneMatch_ = entityTag return c } @@ -27807,21 +28088,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27834,7 +28115,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27847,17 +28128,17 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse -// .Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons +// e.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { +func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27876,7 +28157,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27888,36 +28169,41 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "id": "discoveryengine.projects.locations.dataStores.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", + // "path": "v1alpha/{+parent}/dataStores", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27929,7 +28215,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -27947,42 +28233,42 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context } } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": +// method id "discoveryengine.projects.locations.dataStores.patch": -type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Patch: Updates a DataStore // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27990,21 +28276,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28012,7 +28298,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) if err != nil { return nil, err } @@ -28032,16 +28318,16 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28060,7 +28346,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28072,33 +28358,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "description": "Updates a DataStore", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "id": "discoveryengine.projects.locations.dataStores.patch", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28107,39 +28394,47 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": +// method id "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig": -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all selected Documents in a branch. This -// process is asynchronous. Depending on the number of Documents to be -// deleted, this operation can take hours to complete. Before the delete -// operation completes, some Documents might still be returned by -// DocumentService.GetDocument or DocumentService.ListDocuments. To get -// a list of the Documents to be deleted, set -// PurgeDocumentsRequest.force to false. +// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. +// DocumentProcessingConfig is a singleon resource of DataStore. It's +// empty when DataStore is created. The first call to this method will +// set up DocumentProcessingConfig. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest +// - name: The full resource name of the Document Processing Config. +// Format: +// `projects/*/locations/*/collections/*/dataStores/*/documentProcessin +// gConfig`. +func (r *ProjectsLocationsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { + c := &ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DocumentProcessingConfig to update. The +// following are the only supported fields: * +// DocumentProcessingConfig.ocr_config If not set, all supported fields +// are updated. +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28147,21 +28442,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28169,34 +28464,37 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28215,7 +28513,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28227,28 +28525,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } return ret, nil // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", + // "description": "Updates the DocumentProcessingConfig. DocumentProcessingConfig is a singleon resource of DataStore. It's empty when DataStore is created. The first call to this method will set up DocumentProcessingConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DocumentProcessingConfig to update. The following are the only supported fields: * DocumentProcessingConfig.ocr_config If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:purge", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28257,97 +28561,107 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates a Document. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28366,7 +28680,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28378,25 +28692,33 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "description": "Creates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28405,53 +28727,174 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Delete: Deletes a Document. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": + +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28461,7 +28904,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -28469,21 +28912,21 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28496,7 +28939,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28509,15 +28952,16 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28536,7 +28980,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28548,41 +28992,1343 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "description": "Gets a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": + +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportdocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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 + // { + // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": + +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Documents. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a list of Documents.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": + +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. +// +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": + +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Permanently deletes all selected Documents in a branch. This +// process is asynchronous. Depending on the number of Documents to be +// deleted, this operation can take hours to complete. Before the delete +// operation completes, some Documents might still be returned by +// DocumentService.GetDocument or DocumentService.ListDocuments. To get +// a list of the Documents to be deleted, set +// PurgeDocumentsRequest.force to false. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.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 + // { + // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": + +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.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 + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": + +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.conversations.converse": + +type ProjectsLocationsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Converse: Converses a conversation. +// +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { + c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Converses a conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.conversations.create": + +type ProjectsLocationsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { + c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28591,59 +30337,32 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.converse": +// method id "discoveryengine.projects.locations.dataStores.conversations.delete": -type ProjectsLocationsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to get. Format: +// - name: The resource name of the Conversation to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { - c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28651,21 +30370,21 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28673,16 +30392,11 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt str } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -28693,17 +30407,14 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR -// esponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28722,7 +30433,7 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28734,28 +30445,25 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:converse", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28764,84 +30472,90 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.conversations.create": +// method id "discoveryengine.projects.locations.dataStores.conversations.get": -type ProjectsLocationsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Get: Gets a Conversation. // -// - parent: Full resource name of parent data store. Format: +// - name: The resource name of the Conversation to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { - c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { + c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. // Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -28850,7 +30564,7 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt strin // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28881,26 +30595,23 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.create", + // "description": "Gets a Conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.conversations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, @@ -28911,84 +30622,134 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.delete": +// method id "discoveryengine.projects.locations.dataStores.conversations.list": -type ProjectsLocationsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// List: Lists all Conversations by their parent DataStore. // -// - name: The resource name of the Conversation to delete. Format: +// - parent: The data store resource name. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { + c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29007,7 +30768,7 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29019,25 +30780,46 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.conversations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "filter": { + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/conversations", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29046,79 +30828,106 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.conversations.patch": + +type ProjectsLocationsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { - c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { + c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -29129,7 +30938,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. // Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -29138,7 +30947,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29169,23 +30978,32 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets a Conversation.", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.get", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // }, // "response": { // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, @@ -29196,66 +31014,32 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } -// method id "discoveryengine.projects.locations.dataStores.conversations.list": +// method id "discoveryengine.projects.locations.dataStores.models.operations.get": -type ProjectsLocationsDataStoresConversationsListCall struct { +type ProjectsLocationsDataStoresModelsOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { - c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29265,7 +31049,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -29273,21 +31057,21 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29300,7 +31084,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -29308,22 +31092,19 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29342,7 +31123,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29354,46 +31135,25 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.list", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29402,106 +31162,100 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.patch": +// method id "discoveryengine.projects.locations.dataStores.models.operations.list": -type ProjectsLocationsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { - c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -29512,16 +31266,15 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29540,7 +31293,7 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29552,34 +31305,41 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29588,9 +31348,30 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } -// method id "discoveryengine.projects.locations.dataStores.models.operations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.operations.get": -type ProjectsLocationsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsDataStoresOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29604,8 +31385,8 @@ type ProjectsLocationsDataStoresModelsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -29613,7 +31394,7 @@ func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29623,7 +31404,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -29631,21 +31412,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29671,14 +31452,14 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29710,9 +31491,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.operations.get", // "parameterOrder": [ // "name" // ], @@ -29720,7 +31501,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -29736,9 +31517,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.models.operations.list": +// method id "discoveryengine.projects.locations.dataStores.operations.list": -type ProjectsLocationsDataStoresModelsOperationsListCall struct { +type ProjectsLocationsDataStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29752,29 +31533,29 @@ type ProjectsLocationsDataStoresModelsOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -29782,7 +31563,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29792,7 +31573,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -29800,21 +31581,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29840,7 +31621,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -29848,7 +31629,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29880,9 +31661,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.operations.list", // "parameterOrder": [ // "name" // ], @@ -29895,7 +31676,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, @@ -29925,7 +31706,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -29943,79 +31724,224 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context. } } -// method id "discoveryengine.projects.locations.dataStores.operations.get": +// method id "discoveryengine.projects.locations.dataStores.schemas.create": -type ProjectsLocationsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates a Schema. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { - c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { + c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema + return c +} + +// SchemaId sets the optional parameter "schemaId": Required. The ID to +// use for the Schema, which will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + 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 + // { + // "description": "Creates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.schemas.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/schemas", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.schemas.delete": + +type ProjectsLocationsDataStoresSchemasDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Schema. +// +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -30026,14 +31952,14 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30064,18 +31990,18 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "description": "Deletes a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } @@ -30091,9 +32017,9 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.operations.list": +// method id "discoveryengine.projects.locations.dataStores.schemas.get": -type ProjectsLocationsDataStoresOperationsListCall struct { +type ProjectsLocationsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30102,42 +32028,21 @@ type ProjectsLocationsDataStoresOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets a Schema. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { - c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { + c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30147,7 +32052,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } @@ -30155,21 +32060,21 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30182,7 +32087,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30195,15 +32100,15 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30222,7 +32127,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30234,41 +32139,25 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "description": "Gets a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.schemas.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30277,103 +32166,98 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.dataStores.schemas.list": -type ProjectsLocationsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// List: Gets a list of Schemas. // // - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { - c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { + c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous SchemaService.ListSchemas call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to SchemaService.ListSchemas must match the call +// that provided the page token. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -30384,14 +32268,16 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30410,7 +32296,7 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30422,33 +32308,36 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a Schema.", + // "description": "Gets a list of Schemas.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.schemas.create", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.schemas.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+parent}/schemas", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30457,31 +32346,64 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.schemas.patch": + +type ProjectsLocationsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// Patch: Updates a Schema. // -// - name: The full resource name of the schema, in the format of +// - name: Immutable. The full resource name of the schema, in the +// format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { + c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30489,21 +32411,21 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30511,11 +32433,16 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -30526,14 +32453,14 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30564,16 +32491,21 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes a Schema.", + // "description": "Updates a Schema.", // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "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.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, @@ -30581,6 +32513,9 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -30591,9 +32526,9 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.get": -type ProjectsLocationsDataStoresSchemasGetCall struct { +type ProjectsLocationsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30602,13 +32537,14 @@ type ProjectsLocationsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { - c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30616,7 +32552,7 @@ func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30626,7 +32562,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -30634,21 +32570,21 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30674,15 +32610,16 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30701,7 +32638,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSchema{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30713,25 +32650,25 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.get", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30740,9 +32677,9 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } -// method id "discoveryengine.projects.locations.dataStores.schemas.list": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.list": -type ProjectsLocationsDataStoresSchemasListCall struct { +type ProjectsLocationsDataStoresServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -30751,32 +32688,29 @@ type ProjectsLocationsDataStoresSchemasListCall struct { header_ http.Header } -// List: Gets a list of Schemas. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { - c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The dataStore resource name. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { + c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous SchemaService.ListSchemas call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to SchemaService.ListSchemas must match the call -// that provided the page token. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -30784,7 +32718,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30794,7 +32728,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -30802,21 +32736,21 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30829,7 +32763,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30842,16 +32776,17 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30870,7 +32805,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30882,36 +32817,36 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.list", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/schemas", + // "path": "v1alpha/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30923,7 +32858,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -30941,43 +32876,43 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, } } -// method id "discoveryengine.projects.locations.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.patch": -type ProjectsLocationsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 -// encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { - c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Schema is not found, a new Schema will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// 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 information. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30985,21 +32920,21 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31007,7 +32942,7 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } @@ -31027,14 +32962,16 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31053,7 +32990,7 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31065,33 +33002,34 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "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": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 39c3f2ab607..b1cee5a35a5 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -1272,6 +1272,101 @@ }, "servingConfigs": { "methods": { + "get": { + "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all ServingConfigs linked to this dataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/servingConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1beta/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}/dataStores/{data_store_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": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -2387,6 +2482,101 @@ }, "servingConfigs": { "methods": { + "get": { + "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all ServingConfigs linked to this dataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/servingConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1beta/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}/dataStores/{data_store_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": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", @@ -3534,6 +3724,101 @@ }, "servingConfigs": { "methods": { + "get": { + "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all ServingConfigs linked to this dataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/servingConfigs", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1beta/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}/dataStores/{data_store_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": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -4164,7 +4449,7 @@ } } }, - "revision": "20240129", + "revision": "20240206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -7334,6 +7619,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaEmbeddingConfig": { + "description": "Defines embedding config, used for bring your own embeddings feature.", + "id": "GoogleCloudDiscoveryengineV1betaEmbeddingConfig", + "properties": { + "fieldPath": { + "description": "Full field path in the schema mapped as embedding field.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata", @@ -7975,6 +8271,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse": { + "description": "Response for ListServingConfigs method.", + "id": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + }, + "servingConfigs": { + "description": "All the ServingConfigs for a given dataStore.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse": { "description": "Response message for SiteSearchEngineService.ListTargetSites method.", "id": "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse", @@ -8614,7 +8928,7 @@ "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec", "properties": { "version": { - "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned version of the text-bison@001 model. * `preview`: string. (Public preview) Uses a fine-tuned version of the text-bison@002 model. This model works only for summaries in English.", + "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 version of the text-bison@001 model. LINT.IfChange * `preview`: string. (Public preview) Uses a fine-tuned version of the text-bison@002 model. This model works only for summaries in English. LINT.ThenChange(//depot/google3/cloud/console/web/ai/unified_cloud_search/pages/configurations/widget_tab.ts)", "type": "string" } }, @@ -9136,6 +9450,171 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaServingConfig": { + "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": "GoogleCloudDiscoveryengineV1betaServingConfig", + "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" + }, + "embeddingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaEmbeddingConfig", + "description": "Bring your own embedding config. The config is used for search semantic retrieval. The retrieval is based on the dot product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document embeddings that are provided by this EmbeddingConfig. If SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it overrides this ServingConfig.embedding_config." + }, + "filterControlIds": { + "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig", + "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": "GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig", + "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}/dataStores/{data_store_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" + }, + "rankingExpression": { + "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" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent." + ], + "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" + }, + "GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig", + "properties": { + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig": { + "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": "GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig", + "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" + }, + "contentWatchedMinutesThreshold": { + "deprecated": true, + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demotionEventType": { + "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSiteSearchEngine": { "description": "SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store.", "id": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 15cbae257af..40459d5caaf 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -6193,6 +6193,35 @@ func (s *GoogleCloudDiscoveryengineV1betaDoubleList) UnmarshalJSON(data []byte) return nil } +// GoogleCloudDiscoveryengineV1betaEmbeddingConfig: Defines embedding +// config, used for bring your own embeddings feature. +type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { + // FieldPath: Full field path in the schema mapped as embedding field. + FieldPath string `json:"fieldPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FieldPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FieldPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEmbeddingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEmbeddingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: // Metadata related to the progress of the // SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will @@ -7406,6 +7435,43 @@ func (s *GoogleCloudDiscoveryengineV1betaListSchemasResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaListServingConfigsResponse: Response +// for ListServingConfigs method. +type GoogleCloudDiscoveryengineV1betaListServingConfigsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServingConfigs: All the ServingConfigs for a given dataStore. + ServingConfigs []*GoogleCloudDiscoveryengineV1betaServingConfig `json:"servingConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListServingConfigsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaListTargetSitesResponse: Response // message for SiteSearchEngineService.ListTargetSites method. type GoogleCloudDiscoveryengineV1betaListTargetSitesResponse struct { @@ -8725,9 +8791,11 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMo // 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 version of the - // text-bison@001 model. * `preview`: string. (Public preview) Uses a - // fine-tuned version of the text-bison@002 model. This model works only - // for summaries in English. + // text-bison@001 model. LINT.IfChange * `preview`: string. (Public + // preview) Uses a fine-tuned version of the text-bison@002 model. This + // model works only for summaries in English. + // LINT.ThenChange(//depot/google3/cloud/console/web/ai/unified_cloud_sea + // rch/pages/configurations/widget_tab.ts) Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Version") to @@ -9707,6 +9775,261 @@ func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadat return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaServingConfig: Configures metadata +// that is used to generate serving time results (e.g. search results or +// recommendation predictions). The ServingConfig is passed in the +// search and predict request and generates results. +type GoogleCloudDiscoveryengineV1betaServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered + // boost controls will be applied. Boost controls must be in the same + // data store as the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` + + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Required. The human readable serving config display + // name. Used in Discovery UI. This field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DissociateControlIds: Condition do not associate specifications. If + // multiple do not associate conditions match, all matching do not + // associate controls in the list will execute. Order does not matter. + // Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + + // DiversityLevel: How much diversity to use in recommendation model + // results e.g. `medium-diversity` or `high-diversity`. Currently + // supported values: * `no-diversity` * `low-diversity` * + // `medium-diversity` * `high-diversity` * `auto-diversity` If not + // specified, we choose default based on recommendation model type. + // Default value: `no-diversity`. Can only be set if SolutionType is + // SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + + // EmbeddingConfig: Bring your own embedding config. The config is used + // for search semantic retrieval. The retrieval is based on the dot + // product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the + // document embeddings that are provided by this EmbeddingConfig. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it + // overrides this ServingConfig.embedding_config. + EmbeddingConfig *GoogleCloudDiscoveryengineV1betaEmbeddingConfig `json:"embeddingConfig,omitempty"` + + // FilterControlIds: Filter controls to use in serving path. All + // triggered filter controls will be applied. Filter controls must be in + // the same data store as the serving config. Maximum of 20 filter + // controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig `json:"genericConfig,omitempty"` + + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will + // execute. Order does not matter. Maximum number of specifications is + // 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig `json:"mediaConfig,omitempty"` + + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a + // compatible model (e.g. others-you-may-like CTR to others-you-may-like + // CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. + // If multiple oneway synonyms conditions match, all matching oneway + // synonyms controls in the list will execute. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + + RankingExpression 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. + 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig: Specifies +// the configurations needed for Generic Discovery.Currently we support: +// * `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. + // Only valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig: Specifies +// the configurations needed for Media Discovery. Currently we support: +// * `demote_content_watched`: Threshold for watched content demotion. +// Customers can specify if using watched content demotion or use viewed +// detail page. Using the content watched demotion, customers need to +// specify the watched minutes or percentage exceeds the threshold, the +// content will be demoted in the recommendation result. * +// `promote_fresh_content`: cutoff days for fresh content promotion. +// Customers can specify if using content freshness promotion. If the +// content was published within the cutoff days, the content will be +// promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were + // published for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` + + // ContentWatchedMinutesThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedMinutesThreshold float64 `json:"contentWatchedMinutesThreshold,omitempty"` + + // ContentWatchedPercentageThreshold: Specifies the content watched + // percentage threshold for demotion. Threshold value must be between + // [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + + // DemotionEventType: Specifies the event type used for demoting + // recommendation result. Currently supported values: * `view-item`: + // Item viewed. * `media-play`: Start/resume watching a video, playing a + // song, etc. * `media-complete`: Finished or stopped midway through a + // video, song, etc. If unset, watch history demotion will not be + // applied. Content freshness demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContentFreshnessCutoffDays") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + 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. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + var s1 struct { + ContentWatchedMinutesThreshold gensupport.JSONFloat64 `json:"contentWatchedMinutesThreshold"` + 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.ContentWatchedMinutesThreshold = float64(s1.ContentWatchedMinutesThreshold) + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + // GoogleCloudDiscoveryengineV1betaSiteSearchEngine: SiteSearchEngine // captures DataStore level site search persisting configurations. It is // a singleton value per data store. @@ -16457,102 +16780,100 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages( } } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get": -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16571,7 +16892,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16583,28 +16904,25 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16613,97 +16931,116 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list": -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists all ServingConfigs linked to this dataStore. // -// - servingConfig: 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/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// - parent: The dataStore resource name. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error +// will be non-nil. 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 +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16722,7 +17059,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16734,28 +17071,36 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "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/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" - // }, + // "path": "v1beta/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16767,9 +17112,9 @@ 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -16781,40 +17126,47 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchVerifyTargetSites: Verify target sites' ownership and validity. -// This API sends all the target sites under site search engine for -// verification. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - parent: The parent resource shared by all TargetSites being -// verified. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16822,21 +17174,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16844,34 +17196,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16890,7 +17244,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16902,28 +17256,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } return ret, nil // { - // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "name": { + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "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": "v1beta/{+parent}:batchVerifyTargetSites", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16932,35 +17292,43 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to -// basic site search. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16968,21 +17336,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16990,14 +17358,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17005,19 +17373,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17036,7 +17406,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17048,28 +17418,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } return ret, nil // { - // "description": "Downgrade from advanced site search to basic site search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "siteSearchEngine" + // "servingConfig" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch", + // "path": "v1beta/{+servingConfig}:recommend", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17078,35 +17448,38 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced -// site search. +// Search: Performs a search. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// - servingConfig: The resource name of the Search serving config, such // as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17114,21 +17487,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17136,14 +17509,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17151,19 +17524,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17182,7 +17557,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17194,28 +17569,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } return ret, nil // { - // "description": "Upgrade from basic site search to advanced site search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "description": "Performs a search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", // "parameterOrder": [ - // "siteSearchEngine" + // "servingConfig" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch", + // "path": "v1beta/{+servingConfig}:search", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17224,125 +17599,114 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchDomainVerificationStatus: Returns list of target sites with its -// domain verification status. This method can only be called under data -// store with BASIC_SITE_SEARCH state at the moment. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. +// This API sends all the target sites under site search engine for +// verification. // -// - siteSearchEngine: The site search engine resource under which we -// fetch all the domain verification status. +// - parent: The parent resource shared by all TargetSites being +// verified. // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `FetchDomainVerificationStatus` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `FetchDomainVerificationStatus` must -// match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.urlParams_.Set("pageToken", pageToken) +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse -// -// or error will be non-nil. Any non-2xx status code is an error. -// -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse -// .ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17361,7 +17725,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17373,36 +17737,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } return ret, nil // { - // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", + // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", // "parameterOrder": [ - // "siteSearchEngine" + // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "siteSearchEngine": { - // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus", - // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse" + // "path": "v1beta/{+parent}:batchVerifyTargetSites", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17411,55 +17767,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to +// basic site search. // // - siteSearchEngine: Full resource name of the SiteSearchEngine, such // as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` -// . -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest + c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17467,21 +17803,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17489,14 +17825,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17509,14 +17845,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17547,25 +17883,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } return ret, nil // { - // "description": "Request on-demand recrawl for a list of URIs.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "description": "Downgrade from advanced site search to basic site search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", // "parameterOrder": [ // "siteSearchEngine" // ], // "parameters": { // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:recrawlUris", + // "path": "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -17577,97 +17913,92 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced +// site search. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17698,23 +18029,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", + // "description": "Upgrade from basic site search to advanced site search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -17725,45 +18059,47 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { + s *Service + siteSearchEngine string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// FetchDomainVerificationStatus: Returns list of target sites with its +// domain verification status. This method can only be called under data +// store with BASIC_SITE_SEARCH state at the moment. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) +// - siteSearchEngine: The site search engine resource under which we +// fetch all the domain verification status. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. The maximum value is 1000; values +// above 1000 will be coerced to 1000. If this field is negative, an +// INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `FetchDomainVerificationStatus` call. +// Provide this to retrieve the subsequent page. When paginating, all +// other parameters provided to `FetchDomainVerificationStatus` must +// match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17771,7 +18107,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17781,7 +18117,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ifNoneMatch_ = entityTag return c } @@ -17789,21 +18125,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17816,7 +18152,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17824,21 +18160,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse +// +// or error will be non-nil. Any non-2xx status code is an error. +// +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse +// .ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { if res.Body != nil { @@ -17856,7 +18196,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17868,41 +18208,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", + // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "siteSearchEngine": { + // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17914,7 +18249,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -17932,36 +18267,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - parent: The parent resource shared by all TargetSites being -// created. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this -// field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` +// . +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17969,21 +18302,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17991,14 +18324,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18006,19 +18339,19 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18049,25 +18382,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } return ret, nil // { - // "description": "Creates TargetSite in a batch.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "description": "Request on-demand recrawl for a list of URIs.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", // "parameterOrder": [ - // "parent" + // "siteSearchEngine" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/targetSites:batchCreate", + // "path": "v1beta/{+siteSearchEngine}:recrawlUris", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -18079,90 +18412,97 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18193,26 +18533,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } return ret, nil // { - // "description": "Creates a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/targetSites", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -18223,69 +18560,100 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a TargetSite. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c.ctx_ = ctx +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -18296,14 +18664,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18322,7 +18691,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18334,25 +18703,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } return ret, nil // { - // "description": "Deletes a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18361,103 +18746,114 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a TargetSite. +// BatchCreate: Creates TargetSite in a batch. // -// - name: Full resource name of TargetSite, such as +// - parent: The parent resource shared by all TargetSites being +// created. // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this +// field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaTargetSite or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18476,7 +18872,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18488,25 +18884,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } return ret, nil // { - // "description": "Gets a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", + // "description": "Creates TargetSite in a batch.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/targetSites:batchCreate", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18515,102 +18914,72 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of TargetSites. +// Create: Creates a TargetSite. // -// - parent: The parent site search engine resource name, such as +// - parent: Parent resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to list TargetSites under this site search engine, -// regardless of whether or not this branch exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListTargetSites` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListTargetSites` must match the call that provided the -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.urlParams_.Set("pageToken", pageToken) +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -18621,17 +18990,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerRespons -// e.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18650,7 +19016,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18662,27 +19028,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } return ret, nil // { - // "description": "Gets a list of TargetSites.", + // "description": "Creates a TargetSite.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, @@ -18690,8 +19045,11 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // } // }, // "path": "v1beta/{+parent}/targetSites", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18700,56 +19058,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Delete: Deletes a TargetSite. // -// - name: Output only. The fully qualified resource name of the target -// site. +// - name: Full resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` -// The `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18757,21 +19094,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18779,16 +19116,11 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -18799,14 +19131,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18837,16 +19169,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } return ret, nil // { - // "description": "Updates a TargetSite.", + // "description": "Deletes a TargetSite.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, @@ -18854,9 +19186,6 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" - // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -18867,9 +19196,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18878,13 +19207,17 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a TargetSite. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18892,7 +19225,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18902,7 +19235,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -18910,21 +19243,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18950,14 +19283,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaTargetSite or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18976,7 +19311,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18988,25 +19323,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "description": "Gets a TargetSite.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19015,45 +19350,47 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Gets a list of TargetSites. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to list TargetSites under this site search engine, +// regardless of whether or not this branch exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +// PageSize sets the optional parameter "pageSize": Requested page size. +// Server may return fewer items than requested. If unspecified, server +// will pick an appropriate default. The maximum value is 1000; values +// above 1000 will be coerced to 1000. If this field is negative, an +// INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListTargetSites` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters +// provided to `ListTargetSites` must match the call that provided the // page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -19061,7 +19398,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19071,7 +19408,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ifNoneMatch_ = entityTag return c } @@ -19079,21 +19416,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19106,7 +19443,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19114,20 +19451,22 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19146,7 +19485,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19158,41 +19497,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", + // "description": "Gets a list of TargetSites.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/targetSites", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19204,7 +19538,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -19222,33 +19556,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } } -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Patch: Updates a TargetSite. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest +// - name: Output only. The fully qualified resource name of the target +// site. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` +// The `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19256,21 +19592,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19278,34 +19614,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19336,25 +19672,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } return ret, nil // { - // "description": "Imports all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", + // "description": "Updates a TargetSite.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/suggestionDenyListEntries:import", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -19366,91 +19702,97 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a -// DataStore. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19481,26 +19823,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } return ret, nil // { - // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/suggestionDenyListEntries:purge", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -19511,60 +19850,53 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party -// domain. This method is used only by the Discovery Engine API -// JavaScript pixel and Google Tag Manager. Users should not call this -// method directly. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Ets sets the optional parameter "ets": The event timestamp in -// milliseconds. This prevents browser caching of otherwise identical -// get requests. The name is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// Uri sets the optional parameter "uri": The URL including -// cgi-parameters but excluding the hash fragment with a length limit of -// 5,000 characters. This is often more useful than the referer URL, -// because many browsers only send the domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UserEvent sets the optional parameter "userEvent": Required. URL -// encoded UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19574,7 +19906,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s . // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -19582,21 +19914,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19609,7 +19941,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19617,19 +19949,20 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19648,7 +19981,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19660,41 +19993,41 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } return ret, nil // { - // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "ets": { - // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - // "format": "int64", + // "filter": { + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", // "required": true, // "type": "string" // }, - // "uri": { - // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "userEvent": { - // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+parent}/userEvents:collect", + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19703,38 +20036,54 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": + +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of User events. Request processing might be -// synchronous. Events that already exist are skipped. Use this method -// for backfilling historical user events. Operation.response is of type -// ImportResponse. Note that it is possible for a subset of the items to -// be successfully inserted. Operation.metadata is of type -// ImportMetadata. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest + c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19742,21 +20091,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19764,14 +20113,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19784,14 +20133,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19822,25 +20171,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } return ret, nil // { - // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "description": "Imports all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/userEvents:import", + // "path": "v1beta/{+parent}/suggestionDenyListEntries:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -19852,33 +20201,34 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// Purge: Permanently deletes all SuggestionDenyListEntry for a +// DataStore. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent + c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19886,21 +20236,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19908,14 +20258,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betauserevent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19928,16 +20278,14 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaUserEvent or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19956,7 +20304,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19968,28 +20316,28 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } return ret, nil // { - // "description": "Writes a single user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", + // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/userEvents:write", + // "path": "v1beta/{+parent}/suggestionDenyListEntries:purge", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19998,81 +20346,107 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.create": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Engine. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party +// domain. This method is used only by the Discovery Engine API +// JavaScript pixel and Google Tag Manager. Users should not call this +// method directly. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine return c } -// EngineId sets the optional parameter "engineId": Required. The ID to -// use for the Engine, which will become the final component of the -// Engine's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { - c.urlParams_.Set("engineId", engineId) +// Ets sets the optional parameter "ets": The event timestamp in +// milliseconds. This prevents browser caching of otherwise identical +// get requests. The name is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20083,14 +20457,14 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20109,7 +20483,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20121,33 +20495,41 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a Engine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.create", + // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "engineId": { - // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + // "location": "query", + // "type": "string" + // }, + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/engines", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" - // }, + // "path": "v1beta/{+parent}/userEvents:collect", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20156,34 +20538,38 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": -type ProjectsLocationsCollectionsEnginesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Engine. +// Import: Bulk import of User events. Request processing might be +// synchronous. Events that already exist are skipped. Use this method +// for backfilling historical user events. Operation.response is of type +// ImportResponse. Note that it is possible for a subset of the items to +// be successfully inserted. Operation.metadata is of type +// ImportMetadata. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}`. If the caller does not have permission to -// delete the Engine, regardless of whether or not it exists, a -// PERMISSION_DENIED error is returned. If the Engine to delete does -// not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20191,21 +20577,21 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20213,29 +20599,34 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20266,23 +20657,26 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a Engine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.delete", + // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", + // "parent": { + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/userEvents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -20293,98 +20687,92 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.get": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": -type ProjectsLocationsCollectionsEnginesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Engine. +// Write: Writes a single user event. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betauserevent) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20403,7 +20791,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20415,25 +20803,28 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a Engine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.get", + // "description": "Writes a single user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/userEvents:write", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20442,98 +20833,81 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } -// method id "discoveryengine.projects.locations.collections.engines.list": +// method id "discoveryengine.projects.locations.collections.engines.create": -type ProjectsLocationsCollectionsEnginesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the Engines associated with the project. +// Create: Creates a Engine. // // - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// `. -func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { - c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine return c } -// Filter sets the optional parameter "filter": Filter by solution type. -// For example: solution_type=SOLUTION_TYPE_SEARCH -func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageToken", pageToken) +// EngineId sets the optional parameter "engineId": Required. The ID to +// use for the Engine, which will become the final component of the +// Engine's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -20544,16 +20918,14 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListEnginesResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEnginesResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20572,7 +20944,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20584,32 +20956,21 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists all the Engines associated with the project.", + // "description": "Creates a Engine.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.list", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Not supported.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Not supported.", + // "engineId": { + // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, @@ -20617,8 +20978,11 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO // } // }, // "path": "v1beta/{+parent}/engines", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListEnginesResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20627,66 +20991,34 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.patch": +// method id "discoveryengine.projects.locations.collections.engines.delete": -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Delete: Deletes a Engine. // -// - name: Immutable. The fully qualified resource name of the engine. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}` engine should be 1-63 characters, and valid -// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. If the caller does not have permission to +// delete the Engine, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the Engine to delete does +// not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Engine to update. If an unsupported or unknown -// field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20694,21 +21026,21 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20716,16 +21048,11 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20736,15 +21063,14 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20763,7 +21089,7 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20775,34 +21101,25 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates an Engine", + // "description": "Deletes a Engine.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.patch", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.engines.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20811,77 +21128,79 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": +// method id "discoveryengine.projects.locations.collections.engines.get": -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Get: Gets a Engine. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -20892,17 +21211,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe -// sponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20921,7 +21238,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20933,28 +21250,25 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", + // "description": "Gets a Engine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}:converse", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20963,73 +21277,98 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.engines.conversations.create": +// method id "discoveryengine.projects.locations.collections.engines.list": -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// List: Lists all the Engines associated with the project. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { + 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 information. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -21040,16 +21379,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListEnginesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.He +// ader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21068,7 +21407,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21080,28 +21419,41 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", + // "description": "Lists all the Engines associated with the project.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Not supported.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Not supported.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" - // }, + // "path": "v1beta/{+parent}/engines", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaListEnginesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21110,32 +21462,66 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.patch": + +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// Patch: Updates an Engine // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The fully qualified resource name of the engine. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}` engine should be 1-63 characters, and valid +// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Engine to update. If an unsupported or unknown +// field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21143,21 +21529,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21165,11 +21551,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -21180,14 +21571,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21206,7 +21598,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21218,25 +21610,34 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", + // "description": "Updates an Engine", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21245,79 +21646,77 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.get": +// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Converse: Converses a conversation. // // - name: The resource name of the Conversation to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21328,16 +21727,17 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe +// sponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21356,7 +21756,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21368,25 +21768,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", + // "description": "Converses a conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21395,113 +21798,73 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.engines.conversations.list": +// method id "discoveryengine.projects.locations.collections.engines.conversations.create": -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The data store resource name. Format: +// - parent: Full resource name of parent data store. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21512,17 +21875,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21541,7 +21903,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21553,37 +21915,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.list", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, @@ -21591,8 +21932,11 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // } // }, // "path": "v1beta/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21601,67 +21945,32 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": +// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21669,21 +21978,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21691,16 +22000,11 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -21711,16 +22015,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21739,7 +22041,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21751,34 +22053,25 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21787,9 +22080,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.conversations.get": -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21798,13 +22091,13 @@ type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a Conversation. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21812,7 +22105,7 @@ func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21822,7 +22115,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21830,21 +22123,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21870,14 +22163,16 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21896,7 +22191,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21908,25 +22203,25 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "description": "Gets a Conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.get", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21935,45 +22230,58 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.engines.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.conversations.list": -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesConversationsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists all Conversations by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21981,7 +22289,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21991,7 +22299,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -21999,21 +22307,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22026,7 +22334,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22034,20 +22342,22 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22066,7 +22376,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22078,41 +22388,46 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.list", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", - // "required": true, + // "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` * `conversation_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/conversations", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22124,7 +22439,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -22142,43 +22457,46 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx contex } } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22186,21 +22504,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22208,36 +22526,36 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22256,7 +22574,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22268,28 +22586,34 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:recommend", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22298,97 +22622,97 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": +// method id "discoveryengine.projects.locations.collections.engines.operations.get": -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - servingConfig: 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/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or -// error will be non-nil. 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22407,7 +22731,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22419,28 +22743,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.operations.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "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/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22449,30 +22770,9 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point - 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 - } -} - -// method id "discoveryengine.projects.locations.collections.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.operations.list": -type ProjectsLocationsCollectionsOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -22481,21 +22781,42 @@ type ProjectsLocationsCollectionsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22505,7 +22826,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -22513,21 +22834,21 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22540,7 +22861,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22553,14 +22874,15 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22579,7 +22901,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22591,25 +22913,41 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.get", + // "id": "discoveryengine.projects.locations.collections.engines.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22618,9 +22956,30 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.operations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsCollectionsOperationsListCall struct { +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.get": + +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -22629,42 +22988,22 @@ type ProjectsLocationsCollectionsOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { - c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22674,7 +23013,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -22682,21 +23021,21 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22709,7 +23048,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22722,15 +23061,16 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22749,7 +23089,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22761,41 +23101,25 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.list", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22804,104 +23128,48 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.list": -type ProjectsLocationsDataStoresCompleteQueryCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { s *Service - dataStore string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// List: Lists all ServingConfigs linked to this dataStore. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// - parent: The dataStore resource name. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions -// generated from the past history of SearchService.Search API calls. Do -// not use it when there is no traffic for Search API. * `user-event` - -// Using suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22911,7 +23179,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -22919,21 +23187,21 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22946,7 +23214,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22954,21 +23222,22 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22987,7 +23256,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22999,45 +23268,36 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", // "parameterOrder": [ - // "dataStore" + // "parent" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", // "location": "query", - // "type": "boolean" + // "type": "integer" // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, - // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", - // "location": "query", - // "type": "string" - // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", + // "parent": { + // "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+dataStore}:completeQuery", + // "path": "v1beta/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23046,54 +23306,64 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.create": - -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Creates a DataStore. DataStore is for storing Documents. To -// serve these documents for Search, or Recommendation use case, an -// Engine needs to be created separately. -// -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.patch": + +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user -// want to directly create an advanced data store for site search. If -// the data store is not configured as site search (GENERIC vertical and -// PUBLIC_WEBSITE content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// 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} +// /dataStores/{data_store_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig return c } -// DataStoreId sets the optional parameter "dataStoreId": Required. The -// ID to use for the DataStore, which will become the final component of -// the DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// 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 information. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23101,21 +23371,21 @@ func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23123,34 +23393,36 @@ func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23169,7 +23441,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23181,38 +23453,34 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.create", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "createAdvancedSiteSearch": { - // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "dataStoreId": { - // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "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": "v1beta/{+parent}/dataStores", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23221,34 +23489,43 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.delete": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to delete the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the DataStore to -// delete does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23256,21 +23533,21 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23278,29 +23555,36 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23319,7 +23603,7 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23331,25 +23615,28 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.delete", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23358,102 +23645,97 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.get": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": -type ProjectsLocationsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Search: Performs a search. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to access the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the requested -// DataStore does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: 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/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// *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 *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23472,7 +23754,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23484,25 +23766,28 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.get", + // "description": "Performs a search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+servingConfig}:search", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23511,9 +23796,30 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + 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 ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { +// method id "discoveryengine.projects.locations.collections.operations.get": + +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23522,15 +23828,13 @@ type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to access the [SiteSearchEngine], regardless of -// whether or not it exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23538,7 +23842,7 @@ func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23548,7 +23852,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -23556,21 +23860,21 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23596,16 +23900,14 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSiteSearchEngine or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Heade -// r or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23624,7 +23926,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23636,25 +23938,25 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the SiteSearchEngine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", + // "id": "discoveryengine.projects.locations.collections.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23663,53 +23965,45 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.list": +// method id "discoveryengine.projects.locations.collections.operations.list": -type ProjectsLocationsDataStoresListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// `. If the caller does not have permission to list DataStores under -// this location, regardless of whether or not this data store exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { - c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": Filter by solution type. -// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' -func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum -// allowed value is 50. Values above 50 will be coerced to 50. If this -// field is negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the -// page token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -23717,7 +24011,7 @@ func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23727,7 +24021,7 @@ func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -23735,21 +24029,21 @@ func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23762,7 +24056,7 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23770,22 +24064,1431 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse or error will +// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse -// .Header or (if a response was returned at all) in +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.operations.list", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.completeQuery": + +type ProjectsLocationsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword +// suggestions. +// +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions +// generated from the past history of SearchService.Search API calls. Do +// not use it when there is no traffic for Search API. * `user-event` - +// Using suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "location": "query", + // "type": "boolean" + // }, + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+dataStore}:completeQuery", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.create": + +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataStore. DataStore is for storing Documents. To +// serve these documents for Search, or Recommendation use case, an +// Engine needs to be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.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 + // { + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/dataStores", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.delete": + +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.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 + // { + // "description": "Deletes a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.get": + +type ProjectsLocationsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": + +type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSiteSearchEngine: Gets the SiteSearchEngine. +// +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to access the [SiteSearchEngine], regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSiteSearchEngine or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Heade +// r or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the SiteSearchEngine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.list": + +type ProjectsLocationsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DataStores associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStores under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/dataStores", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaListDataStoresResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.patch": + +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore +// +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a DataStore", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": + +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Document. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23804,7 +25507,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23816,41 +25519,33 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all the DataStores associated with the project.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.list", + // "description": "Creates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/dataStores", + // "path": "v1beta/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListDataStoresResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23859,63 +25554,35 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.patch": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Delete: Deletes a Document. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DataStore to update. If an unsupported or -// unknown field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23923,21 +25590,21 @@ func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23945,16 +25612,11 @@ func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -23965,16 +25627,14 @@ func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23993,7 +25653,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24005,34 +25665,25 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a DataStore", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.patch", + // "description": "Deletes a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24041,98 +25692,94 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// Get: Gets a Document. // -// - parent: The parent resource name, such as +// - name: Full resource name of Document, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument - return c -} - -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. // Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -24141,7 +25788,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24169,34 +25816,26 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil - // { - // "description": "Creates a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + } + return ret, nil + // { + // "description": "Gets a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, @@ -24207,35 +25846,36 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. // -// - name: Full resource name of Document, such as +// - parent: The parent branch resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24243,21 +25883,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24265,29 +25905,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24306,7 +25951,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24318,25 +25963,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24345,36 +25993,56 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a Document. +// List: Gets a list of Documents. // -// - name: Full resource name of Document, such as +// - parent: The parent branch resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24384,7 +26052,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ifNoneMatch_ = entityTag return c } @@ -24392,21 +26060,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24419,7 +26087,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24427,21 +26095,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse. +// Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24460,7 +26128,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24472,25 +26140,36 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "description": "Gets a list of Documents.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/documents", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24499,36 +26178,63 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": + +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. +// Patch: Updates a Document. // -// - parent: The parent branch resource name, such as +// - name: Immutable. The full resource name of the document. Format: // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24536,21 +26242,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24558,34 +26264,36 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24604,7 +26312,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24616,28 +26324,33 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "description": "Updates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents:import", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24646,103 +26359,78 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Documents. +// Purge: Permanently deletes all selected Documents in a branch. This +// process is asynchronous. Depending on the number of Documents to be +// deleted, this operation can take hours to complete. Before the delete +// operation completes, some Documents might still be returned by +// DocumentService.GetDocument or DocumentService.ListDocuments. To get +// a list of the Documents to be deleted, set +// PurgeDocumentsRequest.force to false. // -// - parent: The parent branch resource name, such as +// - parent: The parent resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the -// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -24753,16 +26441,14 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24781,7 +26467,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24793,36 +26479,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents", + // "path": "v1beta/{+parent}/documents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24831,102 +26509,79 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": - -type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": + +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -24937,16 +26592,14 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24965,7 +26618,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24977,33 +26630,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25012,96 +26657,119 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": +// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all selected Documents in a branch. This -// process is asynchronous. Depending on the number of Documents to be -// deleted, this operation can take hours to complete. Before the delete -// operation completes, some Documents might still be returned by -// DocumentService.GetDocument or DocumentService.ListDocuments. To get -// a list of the Documents to be deleted, set -// PurgeDocumentsRequest.force to false. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// 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 +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25120,7 +26788,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25132,28 +26800,41 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } return ret, nil // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents:purge", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest" - // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25162,79 +26843,98 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.conversations.converse": -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Converse: Converses a conversation. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { + c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -25245,14 +26945,17 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25271,7 +26974,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25283,25 +26986,28 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "description": "Converses a conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25310,119 +27016,93 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.dataStores.conversations.create": -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { + c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25441,7 +27121,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25453,41 +27133,28 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "parent": { + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25496,59 +27163,32 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.converse": +// method id "discoveryengine.projects.locations.dataStores.conversations.delete": -type ProjectsLocationsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to get. Format: +// - name: The resource name of the Conversation to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { - c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25556,21 +27196,21 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googl // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25578,16 +27218,11 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt str } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -25598,17 +27233,14 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe -// sponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25627,7 +27259,7 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25639,28 +27271,25 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}:converse", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25669,84 +27298,90 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.conversations.create": +// method id "discoveryengine.projects.locations.dataStores.conversations.get": -type ProjectsLocationsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Get: Gets a Conversation. // -// - parent: Full resource name of parent data store. Format: +// - name: The resource name of the Conversation to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { - c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { + c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. // Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -25755,7 +27390,7 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt strin // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25786,26 +27421,23 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.create", + // "description": "Gets a Conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.conversations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, @@ -25816,84 +27448,134 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.delete": +// method id "discoveryengine.projects.locations.dataStores.conversations.list": -type ProjectsLocationsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// List: Lists all Conversations by their parent DataStore. // -// - name: The resource name of the Conversation to delete. Format: +// - parent: The data store resource name. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { + c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25912,7 +27594,7 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25924,25 +27606,46 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.conversations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "filter": { + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + // "location": "query", + // "type": "string" + // }, + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/conversations", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25951,79 +27654,106 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.conversations.patch": + +type ProjectsLocationsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { - c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { + c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -26034,7 +27764,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. // Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -26043,7 +27773,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26074,23 +27804,32 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets a Conversation.", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.get", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // }, // "response": { // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, @@ -26101,66 +27840,32 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } -// method id "discoveryengine.projects.locations.dataStores.conversations.list": +// method id "discoveryengine.projects.locations.dataStores.models.operations.get": -type ProjectsLocationsDataStoresConversationsListCall struct { +type ProjectsLocationsDataStoresModelsOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { - c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26170,7 +27875,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -26178,21 +27883,21 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26205,7 +27910,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26213,22 +27918,19 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26247,7 +27949,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26259,46 +27961,25 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.list", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26307,106 +27988,100 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.patch": +// method id "discoveryengine.projects.locations.dataStores.models.operations.list": -type ProjectsLocationsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { - c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -26417,16 +28092,15 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26445,7 +28119,7 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26457,34 +28131,41 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" - // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26493,9 +28174,30 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } -// method id "discoveryengine.projects.locations.dataStores.models.operations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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) + } +} + +// method id "discoveryengine.projects.locations.dataStores.operations.get": -type ProjectsLocationsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsDataStoresOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26509,8 +28211,8 @@ type ProjectsLocationsDataStoresModelsOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26518,7 +28220,7 @@ func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26528,7 +28230,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -26536,21 +28238,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26576,14 +28278,14 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26615,9 +28317,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.operations.get", // "parameterOrder": [ // "name" // ], @@ -26625,7 +28327,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -26641,9 +28343,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.models.operations.list": +// method id "discoveryengine.projects.locations.dataStores.operations.list": -type ProjectsLocationsDataStoresModelsOperationsListCall struct { +type ProjectsLocationsDataStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26657,29 +28359,29 @@ type ProjectsLocationsDataStoresModelsOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -26687,7 +28389,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26697,7 +28399,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -26705,21 +28407,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26745,7 +28447,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -26753,7 +28455,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26785,9 +28487,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.operations.list", // "parameterOrder": [ // "name" // ], @@ -26800,7 +28502,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, @@ -26830,7 +28532,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -26848,24 +28550,182 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context. } } -// method id "discoveryengine.projects.locations.dataStores.operations.get": +// method id "discoveryengine.projects.locations.dataStores.schemas.create": -type ProjectsLocationsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Create: Creates a Schema. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { - c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { + c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + return c +} + +// SchemaId sets the optional parameter "schemaId": Required. The ID to +// use for the Schema, which will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + 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 + // { + // "description": "Creates a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.schemas.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/schemas", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.schemas.delete": + +type ProjectsLocationsDataStoresSchemasDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Schema. +// +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26873,54 +28733,41 @@ func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -26931,14 +28778,14 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // 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 *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26969,18 +28816,18 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "description": "Deletes a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } @@ -26996,9 +28843,9 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.operations.list": +// method id "discoveryengine.projects.locations.dataStores.schemas.get": -type ProjectsLocationsDataStoresOperationsListCall struct { +type ProjectsLocationsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27007,42 +28854,21 @@ type ProjectsLocationsDataStoresOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets a Schema. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { - c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { + c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27052,7 +28878,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } @@ -27060,21 +28886,21 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27087,7 +28913,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27100,15 +28926,15 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSchema or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27127,7 +28953,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27139,41 +28965,25 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "description": "Gets a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.schemas.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27182,103 +28992,98 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - 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) - } -} - -// method id "discoveryengine.projects.locations.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.dataStores.schemas.list": -type ProjectsLocationsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// List: Gets a list of Schemas. // // - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { - c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { + c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous SchemaService.ListSchemas call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to SchemaService.ListSchemas must match the call +// that provided the page token. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -27289,14 +29094,16 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListSchemasResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27315,7 +29122,7 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27327,33 +29134,36 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a Schema.", + // "description": "Gets a list of Schemas.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.schemas.create", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.schemas.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+parent}/schemas", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27362,31 +29172,64 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + 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 ProjectsLocationsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.schemas.patch": + +type ProjectsLocationsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// Patch: Updates a Schema. // -// - name: The full resource name of the schema, in the format of +// - name: Immutable. The full resource name of the schema, in the +// format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { + c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27394,21 +29237,21 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27416,11 +29259,16 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -27431,14 +29279,14 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27469,16 +29317,21 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes a Schema.", + // "description": "Updates a Schema.", // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "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.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, @@ -27486,6 +29339,9 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -27496,9 +29352,9 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.get": -type ProjectsLocationsDataStoresSchemasGetCall struct { +type ProjectsLocationsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27507,13 +29363,14 @@ type ProjectsLocationsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { - c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -27521,7 +29378,7 @@ func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27531,7 +29388,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -27539,21 +29396,21 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27579,15 +29436,16 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27606,7 +29464,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSchema{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27618,25 +29476,25 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.get", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27645,9 +29503,9 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } -// method id "discoveryengine.projects.locations.dataStores.schemas.list": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.list": -type ProjectsLocationsDataStoresSchemasListCall struct { +type ProjectsLocationsDataStoresServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -27656,32 +29514,29 @@ type ProjectsLocationsDataStoresSchemasListCall struct { header_ http.Header } -// List: Gets a list of Schemas. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { - c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The dataStore resource name. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/dataStores/{data_store}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { + c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous SchemaService.ListSchemas call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to SchemaService.ListSchemas must match the call -// that provided the page token. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27689,7 +29544,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27699,7 +29554,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -27707,21 +29562,21 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27734,7 +29589,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27747,16 +29602,17 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.He -// ader or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27775,7 +29631,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27787,36 +29643,36 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.list", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. The dataStore resource name. Format: `projects/{project_number}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/schemas", + // "path": "v1beta/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListSchemasResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27828,7 +29684,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -27846,43 +29702,43 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, } } -// method id "discoveryengine.projects.locations.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.patch": -type ProjectsLocationsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 -// encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { - c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Schema is not found, a new Schema will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// 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 information. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27890,21 +29746,21 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27912,7 +29768,7 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } @@ -27932,14 +29788,16 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27958,7 +29816,7 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27970,33 +29828,34 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "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": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" diff --git a/healthcare/v1/healthcare-api.json b/healthcare/v1/healthcare-api.json index 85a498444a1..13a2a8974df 100644 --- a/healthcare/v1/healthcare-api.json +++ b/healthcare/v1/healthcare-api.json @@ -194,12 +194,12 @@ ], "parameters": { "datasetId": { - "description": "The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + "description": "Required. The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", "location": "query", "type": "string" }, "parent": { - "description": "The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", + "description": "Required. The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -257,7 +257,7 @@ ], "parameters": { "name": { - "description": "The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Required. The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -283,7 +283,7 @@ ], "parameters": { "name": { - "description": "The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Required. The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -352,7 +352,7 @@ "type": "string" }, "parent": { - "description": "The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", + "description": "Required. The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -378,14 +378,14 @@ ], "parameters": { "name": { - "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -693,7 +693,7 @@ ], "parameters": { "name": { - "description": "Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", + "description": "Identifier. Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", "required": true, @@ -1333,7 +1333,7 @@ ], "parameters": { "name": { - "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", + "description": "Identifier. Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", "required": true, @@ -3746,12 +3746,12 @@ ], "parameters": { "hl7V2StoreId": { - "description": "The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + "description": "Required. The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", "location": "query", "type": "string" }, "parent": { - "description": "The name of the dataset this HL7v2 store belongs to.", + "description": "Required. The name of the dataset this HL7v2 store belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -3780,7 +3780,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 store to delete.", + "description": "Required. The resource name of the HL7v2 store to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -3806,7 +3806,7 @@ ], "parameters": { "name": { - "description": "The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + "description": "Required. The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -3835,7 +3835,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 store to get.", + "description": "Required. The resource name of the HL7v2 store to get.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -3861,7 +3861,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + "description": "Required. The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -3919,7 +3919,7 @@ ], "parameters": { "name": { - "description": "The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + "description": "Required. The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -3964,7 +3964,7 @@ "type": "string" }, "parent": { - "description": "Name of the dataset.", + "description": "Required. Name of the dataset.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -3990,14 +3990,14 @@ ], "parameters": { "name": { - "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + "description": "Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -4087,7 +4087,7 @@ ], "parameters": { "parent": { - "description": "The name of the HL7v2 store this message belongs to.", + "description": "Required. The name of the HL7v2 store this message belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4116,7 +4116,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 message to delete.", + "description": "Required. The resource name of the HL7v2 message to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", "required": true, @@ -4142,7 +4142,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 message to retrieve.", + "description": "Required. The resource name of the HL7v2 message to retrieve.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", "required": true, @@ -4189,7 +4189,7 @@ ], "parameters": { "parent": { - "description": "The name of the HL7v2 store this message belongs to.", + "description": "Required. The name of the HL7v2 store this message belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4239,7 +4239,7 @@ "type": "string" }, "parent": { - "description": "Name of the HL7v2 store to retrieve messages from.", + "description": "Required. Name of the HL7v2 store to retrieve messages from.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4286,14 +4286,14 @@ ], "parameters": { "name": { - "description": "Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + "description": "Output only. Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -4460,7 +4460,7 @@ } } }, - "revision": "20240112", + "revision": "20240130", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "ActivateConsentRequest": { @@ -4697,7 +4697,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -4795,7 +4795,7 @@ "type": "object" }, "name": { - "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", + "description": "Identifier. Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", "type": "string" }, "policies": { @@ -4953,7 +4953,7 @@ "type": "object" }, "name": { - "description": "Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", + "description": "Identifier. Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", "type": "string" } }, @@ -4965,7 +4965,7 @@ "properties": { "message": { "$ref": "Message", - "description": "HL7v2 message." + "description": "Required. HL7v2 message." } }, "type": "object" @@ -4991,7 +4991,7 @@ "id": "Dataset", "properties": { "name": { - "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "type": "string" }, "timeZone": { @@ -6066,7 +6066,7 @@ "type": "object" }, "name": { - "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + "description": "Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", "type": "string" }, "notificationConfigs": { @@ -6301,7 +6301,7 @@ "properties": { "message": { "$ref": "Message", - "description": "HL7v2 message to ingest." + "description": "Required. HL7v2 message to ingest." } }, "type": "object" @@ -6622,7 +6622,7 @@ "type": "string" }, "data": { - "description": "Raw message bytes.", + "description": "Required. Raw message bytes.", "format": "byte", "type": "string" }, @@ -6638,7 +6638,8 @@ "type": "string" }, "name": { - "description": "Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + "description": "Output only. Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + "readOnly": true, "type": "string" }, "parsedData": { diff --git a/healthcare/v1/healthcare-gen.go b/healthcare/v1/healthcare-gen.go index bac2baa9027..06d8d45b352 100644 --- a/healthcare/v1/healthcare-gen.go +++ b/healthcare/v1/healthcare-gen.go @@ -883,7 +883,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -1068,7 +1072,7 @@ type Consent struct { // given consent. Metadata map[string]string `json:"metadata,omitempty"` - // Name: Resource name of the Consent, of the form + // Name: Identifier. Resource name of the Consent, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c // onsentStores/{consent_store_id}/consents/{consent_id}`. Cannot be // changed after creation. @@ -1300,7 +1304,7 @@ type ConsentStore struct { // https://cloud.google.com/healthcare/docs/how-tos/labeling-resources Labels map[string]string `json:"labels,omitempty"` - // Name: Resource name of the consent store, of the form + // Name: Identifier. Resource name of the consent store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c // onsentStores/{consent_store_id}`. Cannot be changed after creation. Name string `json:"name,omitempty"` @@ -1335,7 +1339,7 @@ func (s *ConsentStore) MarshalJSON() ([]byte, error) { // CreateMessageRequest: Creates a new message. type CreateMessageRequest struct { - // Message: HL7v2 message. + // Message: Required. HL7v2 message. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -1403,7 +1407,7 @@ func (s *CryptoHashConfig) MarshalJSON() ([]byte, error) { // patients. This may include multiple modalities of healthcare data, // such as electronic medical records or medical imaging data. type Dataset struct { - // Name: Resource name of the dataset, of the form + // Name: Identifier. Resource name of the dataset, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`. Name string `json:"name,omitempty"` @@ -3715,7 +3719,7 @@ type Hl7V2Store struct { // associated with a given store. Labels map[string]string `json:"labels,omitempty"` - // Name: Resource name of the HL7v2 store, of the form + // Name: Identifier. Resource name of the HL7v2 store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/h // l7V2Stores/{hl7v2_store_id}`. Name string `json:"name,omitempty"` @@ -4166,7 +4170,7 @@ func (s *InfoTypeTransformation) MarshalJSON() ([]byte, error) { // IngestMessageRequest: Ingests a message into the specified HL7v2 // store. type IngestMessageRequest struct { - // Message: HL7v2 message to ingest. + // Message: Required. HL7v2 message to ingest. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -4844,7 +4848,7 @@ type Message struct { // Set by the server. CreateTime string `json:"createTime,omitempty"` - // Data: Raw message bytes. + // Data: Required. Raw message bytes. Data string `json:"data,omitempty"` // Labels: User-supplied key-value pairs used to organize HL7v2 stores. @@ -4860,7 +4864,7 @@ type Message struct { // MessageType: The message type for this message. MSH-9.1. MessageType string `json:"messageType,omitempty"` - // Name: Resource name of the Message, of the form + // Name: Output only. Resource name of the Message, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/h // l7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the // server. @@ -7169,9 +7173,9 @@ func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Datase return c } -// DatasetId sets the optional parameter "datasetId": The ID of the -// dataset that is being created. The string must match the following -// regex: `[\p{L}\p{N}_\-\.]{1,256}`. +// DatasetId sets the optional parameter "datasetId": Required. The ID +// of the dataset that is being created. The string must match the +// following regex: `[\p{L}\p{N}_\-\.]{1,256}`. func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall { c.urlParams_.Set("datasetId", datasetId) return c @@ -7277,12 +7281,12 @@ func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "datasetId": { - // "description": "The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + // "description": "Required. The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", + // "description": "Required. The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -7576,7 +7580,7 @@ func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "name": { - // "description": "The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + // "description": "Required. The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -7725,7 +7729,7 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Da // ], // "parameters": { // "name": { - // "description": "The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + // "description": "Required. The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -8075,7 +8079,7 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "parent": { - // "description": "The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", + // "description": "Required. The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -8128,7 +8132,7 @@ type ProjectsLocationsDatasetsPatchCall struct { // Patch: Updates dataset metadata. // -// - name: Resource name of the dataset, of the form +// - name: Identifier. Resource name of the dataset, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // `. func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall { @@ -8138,8 +8142,9 @@ func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -8246,14 +8251,14 @@ func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + // "description": "Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -9726,7 +9731,7 @@ type ProjectsLocationsDatasetsConsentStoresPatchCall struct { // Patch: Updates the specified consent store. // -// - name: Resource name of the consent store, of the form +// - name: Identifier. Resource name of the consent store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /consentStores/{consent_store_id}`. Cannot be changed after // creation. @@ -9848,7 +9853,7 @@ func (c *ProjectsLocationsDatasetsConsentStoresPatchCall) Do(opts ...googleapi.C // ], // "parameters": { // "name": { - // "description": "Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", + // "description": "Identifier. Resource name of the consent store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}`. Cannot be changed after creation.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+$", // "required": true, @@ -13044,7 +13049,7 @@ type ProjectsLocationsDatasetsConsentStoresConsentsPatchCall struct { // error occurs if the latest revision of the specified Consent is in // the `REJECTED` or `REVOKED` state. // -// - name: Resource name of the Consent, of the form +// - name: Identifier. Resource name of the Consent, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be // changed after creation. @@ -13166,7 +13171,7 @@ func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Do(opts ...goo // ], // "parameters": { // "name": { - // "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", + // "description": "Identifier. Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", // "required": true, @@ -24212,9 +24217,9 @@ func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v return c } -// Hl7V2StoreId sets the optional parameter "hl7V2StoreId": The ID of -// the HL7v2 store that is being created. The string must match the -// following regex: `[\p{L}\p{N}_\-\.]{1,256}`. +// Hl7V2StoreId sets the optional parameter "hl7V2StoreId": Required. +// The ID of the HL7v2 store that is being created. The string must +// match the following regex: `[\p{L}\p{N}_\-\.]{1,256}`. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId) return c @@ -24320,12 +24325,12 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "hl7V2StoreId": { - // "description": "The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + // "description": "Required. The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "The name of the dataset this HL7v2 store belongs to.", + // "description": "Required. The name of the dataset this HL7v2 store belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -24462,7 +24467,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 store to delete.", + // "description": "Required. The resource name of the HL7v2 store to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -24611,7 +24616,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + // "description": "Required. The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -24761,7 +24766,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 store to get.", + // "description": "Required. The resource name of the HL7v2 store to get.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -24911,7 +24916,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Do(opts . // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + // "description": "Required. The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -25255,7 +25260,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + // "description": "Required. The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -25468,7 +25473,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.Call // "type": "string" // }, // "parent": { - // "description": "Name of the dataset.", + // "description": "Required. Name of the dataset.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -25521,7 +25526,7 @@ type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct { // Patch: Updates the HL7v2 store. // -// - name: Resource name of the HL7v2 store, of the form +// - name: Identifier. Resource name of the HL7v2 store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /hl7V2Stores/{hl7v2_store_id}`. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { @@ -25531,8 +25536,9 @@ func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2st return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -25639,14 +25645,14 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "name": { - // "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + // "description": "Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -26092,7 +26098,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...goog // ], // "parameters": { // "parent": { - // "description": "The name of the HL7v2 store this message belongs to.", + // "description": "Required. The name of the HL7v2 store this message belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -26228,7 +26234,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...goog // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 message to delete.", + // "description": "Required. The resource name of the HL7v2 message to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", // "required": true, @@ -26401,7 +26407,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googlea // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 message to retrieve.", + // "description": "Required. The resource name of the HL7v2 message to retrieve.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", // "required": true, @@ -26571,7 +26577,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...goog // ], // "parameters": { // "parent": { - // "description": "The name of the HL7v2 store this message belongs to.", + // "description": "Required. The name of the HL7v2 store this message belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -26846,7 +26852,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...google // "type": "string" // }, // "parent": { - // "description": "Name of the HL7v2 store to retrieve messages from.", + // "description": "Required. Name of the HL7v2 store to retrieve messages from.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -26925,7 +26931,7 @@ type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct { // the existing set of labels. Existing labels with the same keys are // updated. // -// - name: Resource name of the Message, of the form +// - name: Output only. Resource name of the Message, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by // the server. @@ -26936,8 +26942,9 @@ func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -27044,14 +27051,14 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googl // ], // "parameters": { // "name": { - // "description": "Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + // "description": "Output only. Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index e88b9994f1c..421e977d70a 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -194,12 +194,12 @@ ], "parameters": { "datasetId": { - "description": "The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + "description": "Required. The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", "location": "query", "type": "string" }, "parent": { - "description": "The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", + "description": "Required. The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -257,7 +257,7 @@ ], "parameters": { "name": { - "description": "The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Required. The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -283,7 +283,7 @@ ], "parameters": { "name": { - "description": "The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Required. The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -352,7 +352,7 @@ "type": "string" }, "parent": { - "description": "The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", + "description": "Required. The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -378,14 +378,14 @@ ], "parameters": { "name": { - "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -475,12 +475,12 @@ ], "parameters": { "annotationStoreId": { - "description": "The ID of the Annotation store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + "description": "Required. The ID of the Annotation store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", "location": "query", "type": "string" }, "parent": { - "description": "The name of the dataset this Annotation store belongs to.", + "description": "Required. The name of the dataset this Annotation store belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -509,7 +509,7 @@ ], "parameters": { "name": { - "description": "The resource name of the Annotation store to delete.", + "description": "Required. The resource name of the Annotation store to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -535,7 +535,7 @@ ], "parameters": { "name": { - "description": "The Annotation store to compare against `golden_store`, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + "description": "Required. The Annotation store to compare against `golden_store`, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -564,7 +564,7 @@ ], "parameters": { "name": { - "description": "The name of the Annotation store to export annotations to, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + "description": "Required. The name of the Annotation store to export annotations to, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -593,7 +593,7 @@ ], "parameters": { "name": { - "description": "The resource name of the Annotation store to get.", + "description": "Required. The resource name of the Annotation store to get.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -651,7 +651,7 @@ ], "parameters": { "name": { - "description": "The name of the Annotation store to which the server imports annotations, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + "description": "Required. The name of the Annotation store to which the server imports annotations, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -696,7 +696,7 @@ "type": "string" }, "parent": { - "description": "Name of the dataset.", + "description": "Required. Name of the dataset.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -722,14 +722,14 @@ ], "parameters": { "name": { - "description": "Resource name of the Annotation store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + "description": "Identifier. Resource name of the Annotation store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -819,7 +819,7 @@ ], "parameters": { "parent": { - "description": "The name of the Annotation store this annotation belongs to. For example, `projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.", + "description": "Required. The name of the Annotation store this annotation belongs to. For example, `projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -848,7 +848,7 @@ ], "parameters": { "name": { - "description": "The resource name of the Annotation to delete.", + "description": "Required. The resource name of the Annotation to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", "required": true, @@ -874,7 +874,7 @@ ], "parameters": { "name": { - "description": "The resource name of the Annotation to retrieve.", + "description": "Required. The resource name of the Annotation to retrieve.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", "required": true, @@ -916,7 +916,7 @@ "type": "string" }, "parent": { - "description": "Name of the Annotation store to retrieve Annotations from.", + "description": "Required. Name of the Annotation store to retrieve Annotations from.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", "required": true, @@ -957,14 +957,14 @@ ], "parameters": { "name": { - "description": "Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", + "description": "Identifier. Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -1856,7 +1856,7 @@ ], "parameters": { "name": { - "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", + "description": "Identifier. Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", "required": true, @@ -3585,6 +3585,37 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "explainDataAccess": { + "description": "Explains all the permitted/denied actor, purpose and environment for a given resource.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:explainDataAccess", + "httpMethod": "GET", + "id": "healthcare.projects.locations.datasets.fhirStores.explainDataAccess", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the FHIR store to enforce, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", + "required": true, + "type": "string" + }, + "resourceId": { + "description": "Required. The ID (`{resourceType}/{id}`) of the resource to explain data access on.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}:explainDataAccess", + "response": { + "$ref": "ExplainDataAccessResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-healthcare", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "export": { "description": "Export resources from the FHIR store to the specified destination. This method returns an Operation that can be used to track the status of the export by calling GetOperation. Immediate fatal errors appear in the error field, errors are also logged to Cloud Logging (see [Viewing error logs in Cloud Logging](https://cloud.google.com/healthcare/docs/how-tos/logging)). Otherwise, when the operation finishes, a detailed response of type ExportResourcesResponse is returned in the response field. The metadata field type for this operation is OperationMetadata.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:export", @@ -4722,12 +4753,12 @@ ], "parameters": { "hl7V2StoreId": { - "description": "The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + "description": "Required. The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", "location": "query", "type": "string" }, "parent": { - "description": "The name of the dataset this HL7v2 store belongs to.", + "description": "Required. The name of the dataset this HL7v2 store belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -4756,7 +4787,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 store to delete.", + "description": "Required. The resource name of the HL7v2 store to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4782,7 +4813,7 @@ ], "parameters": { "name": { - "description": "The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + "description": "Required. The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4811,7 +4842,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 store to get.", + "description": "Required. The resource name of the HL7v2 store to get.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4837,7 +4868,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + "description": "Required. The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4895,7 +4926,7 @@ ], "parameters": { "name": { - "description": "The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + "description": "Required. The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -4940,7 +4971,7 @@ "type": "string" }, "parent": { - "description": "Name of the dataset.", + "description": "Required. Name of the dataset.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", "required": true, @@ -4966,14 +4997,14 @@ ], "parameters": { "name": { - "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + "description": "Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -5069,7 +5100,7 @@ "type": "string" }, "parent": { - "description": "Name of the HL7v2 store to retrieve messages from, in the format: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`.", + "description": "Required. Name of the HL7v2 store to retrieve messages from, in the format: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -5116,7 +5147,7 @@ ], "parameters": { "parent": { - "description": "The name of the HL7v2 store this message belongs to.", + "description": "Required. The name of the HL7v2 store this message belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -5145,7 +5176,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 message to delete.", + "description": "Required. The resource name of the HL7v2 message to delete.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", "required": true, @@ -5171,7 +5202,7 @@ ], "parameters": { "name": { - "description": "The resource name of the HL7v2 message to retrieve.", + "description": "Required. The resource name of the HL7v2 message to retrieve.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", "required": true, @@ -5218,7 +5249,7 @@ ], "parameters": { "parent": { - "description": "The name of the HL7v2 store this message belongs to.", + "description": "Required. The name of the HL7v2 store this message belongs to.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -5268,7 +5299,7 @@ "type": "string" }, "parent": { - "description": "Name of the HL7v2 store to retrieve messages from.", + "description": "Required. Name of the HL7v2 store to retrieve messages from.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", "required": true, @@ -5315,14 +5346,14 @@ ], "parameters": { "name": { - "description": "Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + "description": "Output only. Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", "required": true, "type": "string" }, "updateMask": { - "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", "format": "google-fieldmask", "location": "query", "type": "string" @@ -5489,7 +5520,7 @@ } } }, - "revision": "20240112", + "revision": "20240130", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -5507,8 +5538,8 @@ "enumDescriptions": [ "No log level specified. This value is unused.", "No additional consent-related logging is added to audit logs.", - "The following information is included: - One of the following [`consentMode`](https://cloud.google.com/healthcare-api/docs/fhir-consent#audit_logs) fields: (`off`|`emptyScope`|`enforced`|`btg`|`bypass`). - The accessor's request headers - The `log_level` of the [AccessDeterminationLogConfig](google.cloud.healthcare.v1beta1.fhir.FhirStore.ConsentConfig.AccessDeterminationLogConfig) - The final consent evaluation (`PERMIT`, `DENY`, or `NO_CONSENT`) - A human-readable summary of the evaluation", - "Includes `MINIMUM` and, for each resource owner, returns: - The resource owner's name - Most specific part of the `X-Consent-Scope` resulting in consensual determination - Timestamp of the applied enforcement leading to the decision - Enforcement version at the time the applicable consents were applied - The Consent resource name - The timestamp of the Consent resource used for enforcement - Policy type (PATIENT or ADMIN) Note that this mode adds some overhead to CRUD operations." + "The following information is included: * One of the following [`consentMode`](https://cloud.google.com/healthcare-api/docs/fhir-consent#audit_logs) fields: (`off`|`emptyScope`|`enforced`|`btg`|`bypass`). * The accessor's request headers * The `log_level` of the [AccessDeterminationLogConfig](https://cloud.google.com/healthcare-api/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores#AccessDeterminationLogConfig) * The final consent evaluation (`PERMIT`, `DENY`, or `NO_CONSENT`) * A human-readable summary of the evaluation", + "Includes `MINIMUM` and, for each resource owner, returns: * The resource owner's name * Most specific part of the `X-Consent-Scope` resulting in consensual determination * Timestamp of the applied enforcement leading to the decision * Enforcement version at the time the applicable consents were applied * The Consent resource name * The timestamp of the Consent resource used for enforcement * Policy type (`PATIENT` or `ADMIN`) Note that this mode adds some overhead to CRUD operations." ], "type": "string" } @@ -5674,7 +5705,7 @@ "properties": { "annotationSource": { "$ref": "AnnotationSource", - "description": "Details of the source." + "description": "Required. Details of the source." }, "customData": { "additionalProperties": { @@ -5688,7 +5719,7 @@ "description": "Annotations for images. For example, bounding polygons." }, "name": { - "description": "Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", + "description": "Identifier. Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", "type": "string" }, "resourceAnnotation": { @@ -5740,7 +5771,7 @@ "type": "object" }, "name": { - "description": "Resource name of the Annotation store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + "description": "Identifier. Resource name of the Annotation store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", "type": "string" } }, @@ -5984,7 +6015,7 @@ "type": "array" }, "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, @@ -6213,7 +6244,7 @@ "type": "object" }, "name": { - "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", + "description": "Identifier. Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", "type": "string" }, "policies": { @@ -6266,6 +6297,25 @@ }, "type": "object" }, + "ConsentAccessorScope": { + "description": "The accessor scope that describes who can access, for what purpose, in which environment.", + "id": "ConsentAccessorScope", + "properties": { + "actor": { + "description": "An individual, group, or access role that identifies the accessor or a characteristic of the accessor. This can be a resource ID (such as `{resourceType}/{id}`) or an external URI. This value must be present.", + "type": "string" + }, + "environment": { + "description": "An abstract identifier that describes the environment or conditions under which the accessor is acting. Can be “*” if it applies to all environments.", + "type": "string" + }, + "purpose": { + "description": "The intent of data use. Can be “*” if it applies to all purposes.", + "type": "string" + } + }, + "type": "object" + }, "ConsentArtifact": { "description": "Documentation of a user's consent.", "id": "ConsentArtifact", @@ -6448,7 +6498,7 @@ "properties": { "message": { "$ref": "Message", - "description": "HL7v2 message." + "description": "Required. HL7v2 message." } }, "type": "object" @@ -6480,7 +6530,7 @@ "id": "Dataset", "properties": { "name": { - "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + "description": "Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", "type": "string" }, "timeZone": { @@ -6948,7 +6998,7 @@ "type": "object" }, "goldenStore": { - "description": "The Annotation store to use as ground truth, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + "description": "Required. The Annotation store to use as ground truth, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", "type": "string" }, "infoTypeConfig": { @@ -7032,6 +7082,128 @@ }, "type": "object" }, + "ExplainDataAccessConsentInfo": { + "description": "The enforcing consent's metadata.", + "id": "ExplainDataAccessConsentInfo", + "properties": { + "cascadeOrigins": { + "description": "The compartment base resources that matched a cascading policy. Each resource has the following format: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/{resource_type}/{resource_id}`", + "items": { + "type": "string" + }, + "type": "array" + }, + "consentResource": { + "description": "The resource name of this consent resource. Format: `projects/{projectId}/datasets/{datasetId}/fhirStores/{fhirStoreId}/fhir/{resourceType}/{id}`.", + "type": "string" + }, + "enforcementTime": { + "description": "Last enforcement timestamp of this consent resource.", + "format": "google-datetime", + "type": "string" + }, + "matchingAccessorScopes": { + "description": "A list of all the matching accessor scopes of this consent policy that enforced ExplainDataAccessConsentScope.accessor_scope.", + "items": { + "$ref": "ConsentAccessorScope" + }, + "type": "array" + }, + "patientConsentOwner": { + "description": "The patient owning the consent (only applicable for patient consents), in the format: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}/fhir/Patient/{patient_id}`", + "type": "string" + }, + "type": { + "description": "The policy type of consent resource (e.g. PATIENT, ADMIN).", + "enum": [ + "CONSENT_POLICY_TYPE_UNSPECIFIED", + "CONSENT_POLICY_TYPE_PATIENT", + "CONSENT_POLICY_TYPE_ADMIN" + ], + "enumDescriptions": [ + "Unspecified policy type.", + "Consent represent a patient consent.", + "Consent represent an admin consent." + ], + "type": "string" + }, + "variants": { + "description": "The consent's variant combinations. A single consent may have multiple variants.", + "items": { + "enum": [ + "VARIANT_UNSPECIFIED", + "VARIANT_STANDARD", + "VARIANT_CASCADE" + ], + "enumDescriptions": [ + "Consent variant unspecified.", + "Consent is a standard patient or admin consent.", + "Consent is a cascading consent." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ExplainDataAccessConsentScope": { + "description": "A single consent scope that provides info on who has access to the requested resource scope for a particular purpose and environment, enforced by which consent.", + "id": "ExplainDataAccessConsentScope", + "properties": { + "accessorScope": { + "$ref": "ConsentAccessorScope", + "description": "The accessor scope that describes who can access, for what purpose, and in which environment." + }, + "decision": { + "description": "Whether the current consent scope is permitted or denied access on the requested resource.", + "enum": [ + "CONSENT_DECISION_TYPE_UNSPECIFIED", + "CONSENT_DECISION_TYPE_PERMIT", + "CONSENT_DECISION_TYPE_DENY" + ], + "enumDescriptions": [ + "Unspecified consent decision type.", + "Consent permitted access.", + "Consent denied access." + ], + "type": "string" + }, + "enforcingConsents": { + "description": "Metadata of the consent resources that enforce the consent scope's access.", + "items": { + "$ref": "ExplainDataAccessConsentInfo" + }, + "type": "array" + }, + "exceptions": { + "description": "Other consent scopes that created exceptions within this scope.", + "items": { + "$ref": "ExplainDataAccessConsentScope" + }, + "type": "array" + } + }, + "type": "object" + }, + "ExplainDataAccessResponse": { + "description": "List of consent scopes that are applicable to the explained access on a given resource.", + "id": "ExplainDataAccessResponse", + "properties": { + "consentScopes": { + "description": "List of applicable consent scopes. Sorted in order of actor such that scopes belonging to the same actor will be adjacent to each other in the list.", + "items": { + "$ref": "ExplainDataAccessConsentScope" + }, + "type": "array" + }, + "warning": { + "description": "Warnings associated with this response. It inform user with exceeded scope limit errors.", + "type": "string" + } + }, + "type": "object" + }, "ExportAnnotationsRequest": { "description": "Request to export Annotations. The export operation is not atomic. If a failure occurs, any annotations already exported are not removed.", "id": "ExportAnnotationsRequest", @@ -7303,7 +7475,7 @@ "type": "boolean" }, "enableHistoryModifications": { - "description": "Optional. Whether to allow the [ImportResourcesHistory] and [ExecuteBundle] APIs to accept history bundles, and directly insert and overwrite historical resource versions into the FHIR store. Importing resource histories creates resource interactions that have occurred in the past that clients might not allow. If set to false, using history bundles fail with an error.", + "description": "Optional. Whether to allow ExecuteBundle to accept history bundles, and directly insert and overwrite historical resource versions into the FHIR store. If set to false, using history bundles fails with an error.", "type": "boolean" }, "enableUpdateCreate": { @@ -7947,7 +8119,7 @@ "type": "object" }, "name": { - "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + "description": "Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", "type": "string" }, "notificationConfig": { @@ -8253,7 +8425,7 @@ "properties": { "message": { "$ref": "Message", - "description": "HL7v2 message to ingest." + "description": "Required. HL7v2 message to ingest." } }, "type": "object" @@ -8628,7 +8800,7 @@ "type": "string" }, "data": { - "description": "Raw message bytes.", + "description": "Required. Raw message bytes.", "format": "byte", "type": "string" }, @@ -8644,7 +8816,8 @@ "type": "string" }, "name": { - "description": "Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + "description": "Output only. Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + "readOnly": true, "type": "string" }, "parsedData": { diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 8e4bf1980a8..e14f8c410fc 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -500,24 +500,24 @@ type AccessDeterminationLogConfig struct { // unused. // "DISABLED" - No additional consent-related logging is added to // audit logs. - // "MINIMUM" - The following information is included: - One of the + // "MINIMUM" - The following information is included: * One of the // following // [`consentMode`](https://cloud.google.com/healthcare-api/docs/fhir-cons // ent#audit_logs) fields: - // (`off`|`emptyScope`|`enforced`|`btg`|`bypass`). - The accessor's - // request headers - The `log_level` of the - // [AccessDeterminationLogConfig](google.cloud.healthcare.v1beta1.fhir.Fh - // irStore.ConsentConfig.AccessDeterminationLogConfig) - The final - // consent evaluation (`PERMIT`, `DENY`, or `NO_CONSENT`) - A - // human-readable summary of the evaluation + // (`off`|`emptyScope`|`enforced`|`btg`|`bypass`). * The accessor's + // request headers * The `log_level` of the + // [AccessDeterminationLogConfig](https://cloud.google.com/healthcare-api + // /docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores#Ac + // cessDeterminationLogConfig) * The final consent evaluation (`PERMIT`, + // `DENY`, or `NO_CONSENT`) * A human-readable summary of the evaluation // "VERBOSE" - Includes `MINIMUM` and, for each resource owner, - // returns: - The resource owner's name - Most specific part of the - // `X-Consent-Scope` resulting in consensual determination - Timestamp - // of the applied enforcement leading to the decision - Enforcement - // version at the time the applicable consents were applied - The - // Consent resource name - The timestamp of the Consent resource used - // for enforcement - Policy type (PATIENT or ADMIN) Note that this mode - // adds some overhead to CRUD operations. + // returns: * The resource owner's name * Most specific part of the + // `X-Consent-Scope` resulting in consensual determination * Timestamp + // of the applied enforcement leading to the decision * Enforcement + // version at the time the applicable consents were applied * The + // Consent resource name * The timestamp of the Consent resource used + // for enforcement * Policy type (`PATIENT` or `ADMIN`) Note that this + // mode adds some overhead to CRUD operations. LogLevel string `json:"logLevel,omitempty"` // ForceSendFields is a list of field names (e.g. "LogLevel") to @@ -794,7 +794,7 @@ func (s *AnalyzeEntitiesResponse) MarshalJSON() ([]byte, error) { // Annotation: An annotation record. type Annotation struct { - // AnnotationSource: Details of the source. + // AnnotationSource: Required. Details of the source. AnnotationSource *AnnotationSource `json:"annotationSource,omitempty"` // CustomData: Additional information for this annotation record, such @@ -805,7 +805,7 @@ type Annotation struct { // polygons. ImageAnnotation *ImageAnnotation `json:"imageAnnotation,omitempty"` - // Name: Resource name of the Annotation, of the form + // Name: Identifier. Resource name of the Annotation, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/a // nnotationStores/{annotation_store_id}/annotations/{annotation_id}`. Name string `json:"name,omitempty"` @@ -931,7 +931,7 @@ type AnnotationStore struct { // labels can be associated with a given store. Labels map[string]string `json:"labels,omitempty"` - // Name: Resource name of the Annotation store, of the form + // Name: Identifier. Resource name of the Annotation store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/a // nnotationStores/{annotation_store_id}`. Name string `json:"name,omitempty"` @@ -1494,7 +1494,11 @@ type Binding struct { Members []string `json:"members,omitempty"` // Role: Role that is assigned to the list of `members`, or principals. - // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + // For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an + // overview of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). Role string `json:"role,omitempty"` // ForceSendFields is a list of field names (e.g. "Condition") to @@ -1905,7 +1909,7 @@ type Consent struct { // given consent. Metadata map[string]string `json:"metadata,omitempty"` - // Name: Resource name of the Consent, of the form + // Name: Identifier. Resource name of the Consent, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/c // onsentStores/{consent_store_id}/consents/{consent_id}`. Cannot be // changed after creation. @@ -1977,6 +1981,47 @@ func (s *Consent) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConsentAccessorScope: The accessor scope that describes who can +// access, for what purpose, in which environment. +type ConsentAccessorScope struct { + // Actor: An individual, group, or access role that identifies the + // accessor or a characteristic of the accessor. This can be a resource + // ID (such as `{resourceType}/{id}`) or an external URI. This value + // must be present. + Actor string `json:"actor,omitempty"` + + // Environment: An abstract identifier that describes the environment or + // conditions under which the accessor is acting. Can be “*” if it + // applies to all environments. + Environment string `json:"environment,omitempty"` + + // Purpose: The intent of data use. Can be “*” if it applies to all + // purposes. + Purpose string `json:"purpose,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actor") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actor") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ConsentAccessorScope) MarshalJSON() ([]byte, error) { + type NoMethod ConsentAccessorScope + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConsentArtifact: Documentation of a user's consent. type ConsentArtifact struct { // ConsentContentScreenshots: Optional. Screenshots, PDFs, or other @@ -2295,7 +2340,7 @@ type ContextualDeidConfig struct { // CreateMessageRequest: Creates a new message. type CreateMessageRequest struct { - // Message: HL7v2 message. + // Message: Required. HL7v2 message. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -2370,7 +2415,7 @@ type CryptoHashField struct { // patients. This may include multiple modalities of healthcare data, // such as electronic medical records or medical imaging data. type Dataset struct { - // Name: Resource name of the dataset, of the form + // Name: Identifier. Resource name of the dataset, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`. Name string `json:"name,omitempty"` @@ -3270,8 +3315,8 @@ type EvaluateAnnotationStoreRequest struct { // infoType mapping for `golden_store`. GoldenInfoTypeMapping map[string]string `json:"goldenInfoTypeMapping,omitempty"` - // GoldenStore: The Annotation store to use as ground truth, in the - // format of + // GoldenStore: Required. The Annotation store to use as ground truth, + // in the format of // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/a // nnotationStores/{annotation_store_id}`. GoldenStore string `json:"goldenStore,omitempty"` @@ -3417,6 +3462,164 @@ func (s *EvaluateUserConsentsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExplainDataAccessConsentInfo: The enforcing consent's metadata. +type ExplainDataAccessConsentInfo struct { + // CascadeOrigins: The compartment base resources that matched a + // cascading policy. Each resource has the following format: + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/f + // hirStores/{fhir_store_id}/fhir/{resource_type}/{resource_id}` + CascadeOrigins []string `json:"cascadeOrigins,omitempty"` + + // ConsentResource: The resource name of this consent resource. Format: + // `projects/{projectId}/datasets/{datasetId}/fhirStores/{fhirStoreId}/fh + // ir/{resourceType}/{id}`. + ConsentResource string `json:"consentResource,omitempty"` + + // EnforcementTime: Last enforcement timestamp of this consent resource. + EnforcementTime string `json:"enforcementTime,omitempty"` + + // MatchingAccessorScopes: A list of all the matching accessor scopes of + // this consent policy that enforced + // ExplainDataAccessConsentScope.accessor_scope. + MatchingAccessorScopes []*ConsentAccessorScope `json:"matchingAccessorScopes,omitempty"` + + // PatientConsentOwner: The patient owning the consent (only applicable + // for patient consents), in the format: + // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/f + // hirStores/{fhir_store_id}/fhir/Patient/{patient_id}` + PatientConsentOwner string `json:"patientConsentOwner,omitempty"` + + // Type: The policy type of consent resource (e.g. PATIENT, ADMIN). + // + // Possible values: + // "CONSENT_POLICY_TYPE_UNSPECIFIED" - Unspecified policy type. + // "CONSENT_POLICY_TYPE_PATIENT" - Consent represent a patient + // consent. + // "CONSENT_POLICY_TYPE_ADMIN" - Consent represent an admin consent. + Type string `json:"type,omitempty"` + + // Variants: The consent's variant combinations. A single consent may + // have multiple variants. + // + // Possible values: + // "VARIANT_UNSPECIFIED" - Consent variant unspecified. + // "VARIANT_STANDARD" - Consent is a standard patient or admin + // consent. + // "VARIANT_CASCADE" - Consent is a cascading consent. + Variants []string `json:"variants,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CascadeOrigins") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CascadeOrigins") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ExplainDataAccessConsentInfo) MarshalJSON() ([]byte, error) { + type NoMethod ExplainDataAccessConsentInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExplainDataAccessConsentScope: A single consent scope that provides +// info on who has access to the requested resource scope for a +// particular purpose and environment, enforced by which consent. +type ExplainDataAccessConsentScope struct { + // AccessorScope: The accessor scope that describes who can access, for + // what purpose, and in which environment. + AccessorScope *ConsentAccessorScope `json:"accessorScope,omitempty"` + + // Decision: Whether the current consent scope is permitted or denied + // access on the requested resource. + // + // Possible values: + // "CONSENT_DECISION_TYPE_UNSPECIFIED" - Unspecified consent decision + // type. + // "CONSENT_DECISION_TYPE_PERMIT" - Consent permitted access. + // "CONSENT_DECISION_TYPE_DENY" - Consent denied access. + Decision string `json:"decision,omitempty"` + + // EnforcingConsents: Metadata of the consent resources that enforce the + // consent scope's access. + EnforcingConsents []*ExplainDataAccessConsentInfo `json:"enforcingConsents,omitempty"` + + // Exceptions: Other consent scopes that created exceptions within this + // scope. + Exceptions []*ExplainDataAccessConsentScope `json:"exceptions,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AccessorScope") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AccessorScope") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExplainDataAccessConsentScope) MarshalJSON() ([]byte, error) { + type NoMethod ExplainDataAccessConsentScope + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExplainDataAccessResponse: List of consent scopes that are applicable +// to the explained access on a given resource. +type ExplainDataAccessResponse struct { + // ConsentScopes: List of applicable consent scopes. Sorted in order of + // actor such that scopes belonging to the same actor will be adjacent + // to each other in the list. + ConsentScopes []*ExplainDataAccessConsentScope `json:"consentScopes,omitempty"` + + // Warning: Warnings associated with this response. It inform user with + // exceeded scope limit errors. + Warning string `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ConsentScopes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConsentScopes") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExplainDataAccessResponse) MarshalJSON() ([]byte, error) { + type NoMethod ExplainDataAccessResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ExportAnnotationsRequest: Request to export Annotations. The export // operation is not atomic. If a failure occurs, any annotations already // exported are not removed. @@ -4050,13 +4253,10 @@ type FhirStore struct { // read the historical versions. DisableResourceVersioning bool `json:"disableResourceVersioning,omitempty"` - // EnableHistoryModifications: Optional. Whether to allow the - // [ImportResourcesHistory] and [ExecuteBundle] APIs to accept history - // bundles, and directly insert and overwrite historical resource - // versions into the FHIR store. Importing resource histories creates - // resource interactions that have occurred in the past that clients - // might not allow. If set to false, using history bundles fail with an - // error. + // EnableHistoryModifications: Optional. Whether to allow ExecuteBundle + // to accept history bundles, and directly insert and overwrite + // historical resource versions into the FHIR store. If set to false, + // using history bundles fails with an error. EnableHistoryModifications bool `json:"enableHistoryModifications,omitempty"` // EnableUpdateCreate: Whether this FHIR store has the updateCreate @@ -5397,7 +5597,7 @@ type Hl7V2Store struct { // associated with a given store. Labels map[string]string `json:"labels,omitempty"` - // Name: Resource name of the HL7v2 store, of the form + // Name: Identifier. Resource name of the HL7v2 store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/h // l7V2Stores/{hl7v2_store_id}`. Name string `json:"name,omitempty"` @@ -5993,7 +6193,7 @@ func (s *InfoTypeTransformation) MarshalJSON() ([]byte, error) { // IngestMessageRequest: Ingests a message into the specified HL7v2 // store. type IngestMessageRequest struct { - // Message: HL7v2 message to ingest. + // Message: Required. HL7v2 message to ingest. Message *Message `json:"message,omitempty"` // ForceSendFields is a list of field names (e.g. "Message") to @@ -6765,7 +6965,7 @@ type Message struct { // Set by the server. CreateTime string `json:"createTime,omitempty"` - // Data: Raw message bytes. + // Data: Required. Raw message bytes. Data string `json:"data,omitempty"` // Labels: User-supplied key-value pairs used to organize HL7v2 stores. @@ -6781,7 +6981,7 @@ type Message struct { // MessageType: The message type for this message. MSH-9.1. MessageType string `json:"messageType,omitempty"` - // Name: Resource name of the Message, of the form + // Name: Output only. Resource name of the Message, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/h // l7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the // server. @@ -9556,9 +9756,9 @@ func (r *ProjectsLocationsDatasetsService) Create(parent string, dataset *Datase return c } -// DatasetId sets the optional parameter "datasetId": The ID of the -// dataset that is being created. The string must match the following -// regex: `[\p{L}\p{N}_\-\.]{1,256}`. +// DatasetId sets the optional parameter "datasetId": Required. The ID +// of the dataset that is being created. The string must match the +// following regex: `[\p{L}\p{N}_\-\.]{1,256}`. func (c *ProjectsLocationsDatasetsCreateCall) DatasetId(datasetId string) *ProjectsLocationsDatasetsCreateCall { c.urlParams_.Set("datasetId", datasetId) return c @@ -9664,12 +9864,12 @@ func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "datasetId": { - // "description": "The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + // "description": "Required. The ID of the dataset that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", + // "description": "Required. The name of the project where the server creates the dataset. For example, `projects/{project_id}/locations/{location_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -9963,7 +10163,7 @@ func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) ( // ], // "parameters": { // "name": { - // "description": "The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + // "description": "Required. The name of the dataset to delete. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -10112,7 +10312,7 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Da // ], // "parameters": { // "name": { - // "description": "The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + // "description": "Required. The name of the dataset to read. For example, `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -10462,7 +10662,7 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*L // "type": "string" // }, // "parent": { - // "description": "The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", + // "description": "Required. The name of the project whose datasets should be listed. For example, `projects/{project_id}/locations/{location_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, @@ -10515,7 +10715,7 @@ type ProjectsLocationsDatasetsPatchCall struct { // Patch: Updates dataset metadata. // -// - name: Resource name of the dataset, of the form +// - name: Identifier. Resource name of the dataset, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // `. func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) *ProjectsLocationsDatasetsPatchCall { @@ -10525,8 +10725,9 @@ func (r *ProjectsLocationsDatasetsService) Patch(name string, dataset *Dataset) return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -10633,14 +10834,14 @@ func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (* // ], // "parameters": { // "name": { - // "description": "Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", + // "description": "Identifier. Resource name of the dataset, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -10982,8 +11183,8 @@ func (r *ProjectsLocationsDatasetsAnnotationStoresService) Create(parent string, } // AnnotationStoreId sets the optional parameter "annotationStoreId": -// The ID of the Annotation store that is being created. The string must -// match the following regex: `[\p{L}\p{N}_\-\.]{1,256}`. +// Required. The ID of the Annotation store that is being created. The +// string must match the following regex: `[\p{L}\p{N}_\-\.]{1,256}`. func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) AnnotationStoreId(annotationStoreId string) *ProjectsLocationsDatasetsAnnotationStoresCreateCall { c.urlParams_.Set("annotationStoreId", annotationStoreId) return c @@ -11089,12 +11290,12 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresCreateCall) Do(opts ...googlea // ], // "parameters": { // "annotationStoreId": { - // "description": "The ID of the Annotation store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + // "description": "Required. The ID of the Annotation store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "The name of the dataset this Annotation store belongs to.", + // "description": "Required. The name of the dataset this Annotation store belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -11231,7 +11432,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresDeleteCall) Do(opts ...googlea // ], // "parameters": { // "name": { - // "description": "The resource name of the Annotation store to delete.", + // "description": "Required. The resource name of the Annotation store to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -11380,7 +11581,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresEvaluateCall) Do(opts ...googl // ], // "parameters": { // "name": { - // "description": "The Annotation store to compare against `golden_store`, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + // "description": "Required. The Annotation store to compare against `golden_store`, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -11531,7 +11732,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresExportCall) Do(opts ...googlea // ], // "parameters": { // "name": { - // "description": "The name of the Annotation store to export annotations to, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + // "description": "Required. The name of the Annotation store to export annotations to, in the format of `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -11682,7 +11883,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresGetCall) Do(opts ...googleapi. // ], // "parameters": { // "name": { - // "description": "The resource name of the Annotation store to get.", + // "description": "Required. The resource name of the Annotation store to get.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -12007,7 +12208,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresImportCall) Do(opts ...googlea // ], // "parameters": { // "name": { - // "description": "The name of the Annotation store to which the server imports annotations, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + // "description": "Required. The name of the Annotation store to which the server imports annotations, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -12221,7 +12422,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresListCall) Do(opts ...googleapi // "type": "string" // }, // "parent": { - // "description": "Name of the dataset.", + // "description": "Required. Name of the dataset.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -12274,7 +12475,8 @@ type ProjectsLocationsDatasetsAnnotationStoresPatchCall struct { // Patch: Updates the specified Annotation store. // -// - name: Resource name of the Annotation store, of the form +// - name: Identifier. Resource name of the Annotation store, of the +// form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /annotationStores/{annotation_store_id}`. func (r *ProjectsLocationsDatasetsAnnotationStoresService) Patch(name string, annotationstore *AnnotationStore) *ProjectsLocationsDatasetsAnnotationStoresPatchCall { @@ -12284,8 +12486,9 @@ func (r *ProjectsLocationsDatasetsAnnotationStoresService) Patch(name string, an return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -12392,14 +12595,14 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresPatchCall) Do(opts ...googleap // ], // "parameters": { // "name": { - // "description": "Resource name of the Annotation store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", + // "description": "Identifier. Resource name of the Annotation store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -12845,7 +13048,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsCreateCall) Do(opts // ], // "parameters": { // "parent": { - // "description": "The name of the Annotation store this annotation belongs to. For example, `projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.", + // "description": "Required. The name of the Annotation store this annotation belongs to. For example, `projects/my-project/locations/us-central1/datasets/mydataset/annotationStores/myannotationstore`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -12982,7 +13185,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsDeleteCall) Do(opts // ], // "parameters": { // "name": { - // "description": "The resource name of the Annotation to delete.", + // "description": "Required. The resource name of the Annotation to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", // "required": true, @@ -13129,7 +13332,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsGetCall) Do(opts .. // ], // "parameters": { // "name": { - // "description": "The resource name of the Annotation to retrieve.", + // "description": "Required. The resource name of the Annotation to retrieve.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", // "required": true, @@ -13340,7 +13543,7 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsListCall) Do(opts . // "type": "string" // }, // "parent": { - // "description": "Name of the Annotation store to retrieve Annotations from.", + // "description": "Required. Name of the Annotation store to retrieve Annotations from.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+$", // "required": true, @@ -13408,7 +13611,7 @@ type ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall struct { // Patch: Updates the Annotation. // -// - name: Resource name of the Annotation, of the form +// - name: Identifier. Resource name of the Annotation, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /annotationStores/{annotation_store_id}/annotations/{annotation_id}` // . @@ -13419,8 +13622,9 @@ func (r *ProjectsLocationsDatasetsAnnotationStoresAnnotationsService) Patch(name return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -13527,14 +13731,14 @@ func (c *ProjectsLocationsDatasetsAnnotationStoresAnnotationsPatchCall) Do(opts // ], // "parameters": { // "name": { - // "description": "Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", + // "description": "Identifier. Resource name of the Annotation, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/annotationStores/{annotation_store_id}/annotations/{annotation_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/annotationStores/[^/]+/annotations/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -18072,7 +18276,7 @@ type ProjectsLocationsDatasetsConsentStoresConsentsPatchCall struct { // error occurs if the latest revision of the specified Consent is in // the `REJECTED` or `REVOKED` state. // -// - name: Resource name of the Consent, of the form +// - name: Identifier. Resource name of the Consent, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be // changed after creation. @@ -18194,7 +18398,7 @@ func (c *ProjectsLocationsDatasetsConsentStoresConsentsPatchCall) Do(opts ...goo // ], // "parameters": { // "name": { - // "description": "Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", + // "description": "Identifier. Resource name of the Consent, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/consentStores/{consent_store_id}/consents/{consent_id}`. Cannot be changed after creation.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/consentStores/[^/]+/consents/[^/]+$", // "required": true, @@ -26020,6 +26224,168 @@ func (c *ProjectsLocationsDatasetsFhirStoresDeleteCall) Do(opts ...googleapi.Cal } +// method id "healthcare.projects.locations.datasets.fhirStores.explainDataAccess": + +type ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ExplainDataAccess: Explains all the permitted/denied actor, purpose +// and environment for a given resource. +// +// - name: The name of the FHIR store to enforce, in the format +// `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} +// /fhirStores/{fhir_store_id}`. +func (r *ProjectsLocationsDatasetsFhirStoresService) ExplainDataAccess(name string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall { + c := &ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ResourceId sets the optional parameter "resourceId": Required. The ID +// (`{resourceType}/{id}`) of the resource to explain data access on. +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) ResourceId(resourceId string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall { + c.urlParams_.Set("resourceId", resourceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Context(ctx context.Context) *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:explainDataAccess") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "healthcare.projects.locations.datasets.fhirStores.explainDataAccess" call. +// Exactly one of *ExplainDataAccessResponse or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *ExplainDataAccessResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsFhirStoresExplainDataAccessCall) Do(opts ...googleapi.CallOption) (*ExplainDataAccessResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ExplainDataAccessResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Explains all the permitted/denied actor, purpose and environment for a given resource.", + // "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/fhirStores/{fhirStoresId}:explainDataAccess", + // "httpMethod": "GET", + // "id": "healthcare.projects.locations.datasets.fhirStores.explainDataAccess", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The name of the FHIR store to enforce, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/fhirStores/{fhir_store_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/fhirStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "resourceId": { + // "description": "Required. The ID (`{resourceType}/{id}`) of the resource to explain data access on.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta1/{+name}:explainDataAccess", + // "response": { + // "$ref": "ExplainDataAccessResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-healthcare", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "healthcare.projects.locations.datasets.fhirStores.export": type ProjectsLocationsDatasetsFhirStoresExportCall struct { @@ -31318,9 +31684,9 @@ func (r *ProjectsLocationsDatasetsHl7V2StoresService) Create(parent string, hl7v return c } -// Hl7V2StoreId sets the optional parameter "hl7V2StoreId": The ID of -// the HL7v2 store that is being created. The string must match the -// following regex: `[\p{L}\p{N}_\-\.]{1,256}`. +// Hl7V2StoreId sets the optional parameter "hl7V2StoreId": Required. +// The ID of the HL7v2 store that is being created. The string must +// match the following regex: `[\p{L}\p{N}_\-\.]{1,256}`. func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Hl7V2StoreId(hl7V2StoreId string) *ProjectsLocationsDatasetsHl7V2StoresCreateCall { c.urlParams_.Set("hl7V2StoreId", hl7V2StoreId) return c @@ -31426,12 +31792,12 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresCreateCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "hl7V2StoreId": { - // "description": "The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", + // "description": "Required. The ID of the HL7v2 store that is being created. The string must match the following regex: `[\\p{L}\\p{N}_\\-\\.]{1,256}`.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "The name of the dataset this HL7v2 store belongs to.", + // "description": "Required. The name of the dataset this HL7v2 store belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -31568,7 +31934,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresDeleteCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 store to delete.", + // "description": "Required. The resource name of the HL7v2 store to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -31717,7 +32083,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresExportCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + // "description": "Required. The name of the source HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -31867,7 +32233,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresGetCall) Do(opts ...googleapi.CallO // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 store to get.", + // "description": "Required. The resource name of the HL7v2 store to get.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -32017,7 +32383,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresGetHL7v2StoreMetricsCall) Do(opts . // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + // "description": "Required. The resource name of the HL7v2 store to get metrics for, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -32361,7 +32727,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresImportCall) Do(opts ...googleapi.Ca // ], // "parameters": { // "name": { - // "description": "The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", + // "description": "Required. The name of the target HL7v2 store, in the format `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -32574,7 +32940,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresListCall) Do(opts ...googleapi.Call // "type": "string" // }, // "parent": { - // "description": "Name of the dataset.", + // "description": "Required. Name of the dataset.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", // "required": true, @@ -32627,7 +32993,7 @@ type ProjectsLocationsDatasetsHl7V2StoresPatchCall struct { // Patch: Updates the HL7v2 store. // -// - name: Resource name of the HL7v2 store, of the form +// - name: Identifier. Resource name of the HL7v2 store, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /hl7V2Stores/{hl7v2_store_id}`. func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2store *Hl7V2Store) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { @@ -32637,8 +33003,9 @@ func (r *ProjectsLocationsDatasetsHl7V2StoresService) Patch(name string, hl7v2st return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -32745,14 +33112,14 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresPatchCall) Do(opts ...googleapi.Cal // ], // "parameters": { // "name": { - // "description": "Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", + // "description": "Identifier. Resource name of the HL7v2 store, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7v2_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -33248,7 +33615,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesBatchGetCall) Do(opts ...go // "type": "string" // }, // "parent": { - // "description": "Name of the HL7v2 store to retrieve messages from, in the format: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`.", + // "description": "Required. Name of the HL7v2 store to retrieve messages from, in the format: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7v2Stores/{hl7v2_store_id}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -33414,7 +33781,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesCreateCall) Do(opts ...goog // ], // "parameters": { // "parent": { - // "description": "The name of the HL7v2 store this message belongs to.", + // "description": "Required. The name of the HL7v2 store this message belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -33550,7 +33917,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesDeleteCall) Do(opts ...goog // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 message to delete.", + // "description": "Required. The resource name of the HL7v2 message to delete.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", // "required": true, @@ -33726,7 +34093,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesGetCall) Do(opts ...googlea // ], // "parameters": { // "name": { - // "description": "The resource name of the HL7v2 message to retrieve.", + // "description": "Required. The resource name of the HL7v2 message to retrieve.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", // "required": true, @@ -33896,7 +34263,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesIngestCall) Do(opts ...goog // ], // "parameters": { // "parent": { - // "description": "The name of the HL7v2 store this message belongs to.", + // "description": "Required. The name of the HL7v2 store this message belongs to.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -34174,7 +34541,7 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesListCall) Do(opts ...google // "type": "string" // }, // "parent": { - // "description": "Name of the HL7v2 store to retrieve messages from.", + // "description": "Required. Name of the HL7v2 store to retrieve messages from.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+$", // "required": true, @@ -34253,7 +34620,7 @@ type ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall struct { // the existing set of labels. Existing labels with the same keys are // updated. // -// - name: Resource name of the Message, of the form +// - name: Output only. Resource name of the Message, of the form // `projects/{project_id}/locations/{location_id}/datasets/{dataset_id} // /hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by // the server. @@ -34264,8 +34631,9 @@ func (r *ProjectsLocationsDatasetsHl7V2StoresMessagesService) Patch(name string, return c } -// UpdateMask sets the optional parameter "updateMask": The update mask -// applies to the resource. For the `FieldMask` definition, see +// UpdateMask sets the optional parameter "updateMask": Required. The +// update mask applies to the resource. For the `FieldMask` definition, +// see // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall { c.urlParams_.Set("updateMask", updateMask) @@ -34372,14 +34740,14 @@ func (c *ProjectsLocationsDatasetsHl7V2StoresMessagesPatchCall) Do(opts ...googl // ], // "parameters": { // "name": { - // "description": "Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", + // "description": "Output only. Resource name of the Message, of the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}/hl7V2Stores/{hl7_v2_store_id}/messages/{message_id}`. Assigned by the server.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+/hl7V2Stores/[^/]+/messages/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", + // "description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", // "format": "google-fieldmask", // "location": "query", // "type": "string" diff --git a/recaptchaenterprise/v1/recaptchaenterprise-api.json b/recaptchaenterprise/v1/recaptchaenterprise-api.json index e01a742d494..feb13d09196 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-api.json +++ b/recaptchaenterprise/v1/recaptchaenterprise-api.json @@ -694,7 +694,7 @@ } } }, - "revision": "20240113", + "revision": "20240204", "rootUrl": "https://recaptchaenterprise.googleapis.com/", "schemas": { "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { @@ -1098,6 +1098,10 @@ "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction", "description": "This action will deny access to a given page. The user will get an HTTP error code." }, + "includeRecaptchaScript": { + "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction", + "description": "This action will inject reCAPTCHA JavaScript code into the HTML page returned by the site backend." + }, "redirect": { "$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction", "description": "This action will redirect the request to a ReCaptcha interstitial to attach a token." @@ -1125,6 +1129,12 @@ "properties": {}, "type": "object" }, + "GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction": { + "description": "An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript code into the HTML returned by the site backend. This reCAPTCHA script is tasked with collecting user signals on the requested web page, issuing tokens as a cookie within the site domain, and enabling their utilization in subsequent page requests.", + "id": "GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction", + "properties": {}, + "type": "object" + }, "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction": { "description": "A redirect action returns a 307 (temporary redirect) response, pointing the user to a ReCaptcha interstitial page to attach a token.", "id": "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction", diff --git a/recaptchaenterprise/v1/recaptchaenterprise-gen.go b/recaptchaenterprise/v1/recaptchaenterprise-gen.go index 92f4676e3f7..d7db7edd805 100644 --- a/recaptchaenterprise/v1/recaptchaenterprise-gen.go +++ b/recaptchaenterprise/v1/recaptchaenterprise-gen.go @@ -808,6 +808,10 @@ type GoogleCloudRecaptchaenterpriseV1FirewallAction struct { // get an HTTP error code. Block *GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction `json:"block,omitempty"` + // IncludeRecaptchaScript: This action will inject reCAPTCHA JavaScript + // code into the HTML page returned by the site backend. + IncludeRecaptchaScript *GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction `json:"includeRecaptchaScript,omitempty"` + // Redirect: This action will redirect the request to a ReCaptcha // interstitial to attach a token. Redirect *GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction `json:"redirect,omitempty"` @@ -854,6 +858,15 @@ type GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction struct { type GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction struct { } +// GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAc +// tion: An include reCAPTCHA script action involves injecting reCAPTCHA +// JavaScript code into the HTML returned by the site backend. This +// reCAPTCHA script is tasked with collecting user signals on the +// requested web page, issuing tokens as a cookie within the site +// domain, and enabling their utilization in subsequent page requests. +type GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction struct { +} + // GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction: A // redirect action returns a 307 (temporary redirect) response, pointing // the user to a ReCaptcha interstitial page to attach a token. diff --git a/retail/v2/retail-api.json b/retail/v2/retail-api.json index 35b222e0e16..e4e35638a5e 100644 --- a/retail/v2/retail-api.json +++ b/retail/v2/retail-api.json @@ -173,6 +173,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "exportAnalyticsMetrics": { + "description": "Exports analytics metrics. `Operation.response` is of type `ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type `ExportMetadata`.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:exportAnalyticsMetrics", + "httpMethod": "POST", + "id": "retail.projects.locations.catalogs.exportAnalyticsMetrics", + "parameterOrder": [ + "catalog" + ], + "parameters": { + "catalog": { + "description": "Required. Full resource name of the parent catalog. Expected format: `projects/*/locations/*/catalogs/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+catalog}:exportAnalyticsMetrics", + "request": { + "$ref": "GoogleCloudRetailV2ExportAnalyticsMetricsRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "getAttributesConfig": { "description": "Gets an AttributesConfig.", "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", @@ -2059,7 +2087,7 @@ } } }, - "revision": "20240129", + "revision": "20240207", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2367,6 +2395,21 @@ }, "type": "object" }, + "GoogleCloudRetailV2BigQueryOutputResult": { + "description": "A BigQuery output result.", + "id": "GoogleCloudRetailV2BigQueryOutputResult", + "properties": { + "datasetId": { + "description": "The ID of a BigQuery Dataset.", + "type": "string" + }, + "tableId": { + "description": "The ID of a BigQuery Table.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2BigQuerySource": { "description": "BigQuery source import data from.", "id": "GoogleCloudRetailV2BigQuerySource", @@ -2998,6 +3041,54 @@ }, "type": "object" }, + "GoogleCloudRetailV2ExportAnalyticsMetricsRequest": { + "description": "Request message for the `ExportAnalyticsMetrics` method.", + "id": "GoogleCloudRetailV2ExportAnalyticsMetricsRequest", + "properties": { + "filter": { + "description": "A filtering expression to specify restrictions on returned metrics. The expression is a sequence of terms. Each term applies a restriction to the returned metrics. Use this expression to restrict results to a specific time range. Currently we expect only one types of fields: * `timestamp`: This can be specified twice, once with a less than operator and once with a greater than operator. The `timestamp` restriction should result in one, contiguous, valid, `timestamp` range. Some examples of valid filters expressions: * Example 1: `timestamp \u003e \"2012-04-23T18:25:43.511Z\" timestamp \u003c \"2012-04-23T18:30:43.511Z\"` * Example 2: `timestamp \u003e \"2012-04-23T18:25:43.511Z\"`", + "type": "string" + }, + "outputConfig": { + "$ref": "GoogleCloudRetailV2OutputConfig", + "description": "Required. The output location of the data." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2ExportAnalyticsMetricsResponse": { + "description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudRetailV2ExportAnalyticsMetricsResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "errorsConfig": { + "$ref": "GoogleCloudRetailV2ExportErrorsConfig", + "description": "This field is never set." + }, + "outputResult": { + "$ref": "GoogleCloudRetailV2OutputResult", + "description": "Output result indicating where the data were exported to." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2ExportErrorsConfig": { + "description": "Configuration of destination for Export related errors.", + "id": "GoogleCloudRetailV2ExportErrorsConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2FulfillmentInfo": { "description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.", "id": "GoogleCloudRetailV2FulfillmentInfo", @@ -3016,6 +3107,17 @@ }, "type": "object" }, + "GoogleCloudRetailV2GcsOutputResult": { + "description": "A Gcs output result.", + "id": "GoogleCloudRetailV2GcsOutputResult", + "properties": { + "outputUri": { + "description": "The uri of Gcs output", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2GcsSource": { "description": "Google Cloud Storage location for input content.", "id": "GoogleCloudRetailV2GcsSource", @@ -3575,6 +3677,72 @@ }, "type": "object" }, + "GoogleCloudRetailV2OutputConfig": { + "description": "The output configuration setting.", + "id": "GoogleCloudRetailV2OutputConfig", + "properties": { + "bigqueryDestination": { + "$ref": "GoogleCloudRetailV2OutputConfigBigQueryDestination", + "description": "The BigQuery location where the output is to be written to." + }, + "gcsDestination": { + "$ref": "GoogleCloudRetailV2OutputConfigGcsDestination", + "description": "The Google Cloud Storage location where the output is to be written to." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2OutputConfigBigQueryDestination": { + "description": "The BigQuery output destination configuration.", + "id": "GoogleCloudRetailV2OutputConfigBigQueryDestination", + "properties": { + "datasetId": { + "description": "Required. The ID of a BigQuery Dataset.", + "type": "string" + }, + "tableIdPrefix": { + "description": "Required. The prefix of exported BigQuery tables.", + "type": "string" + }, + "tableType": { + "description": "Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2OutputConfigGcsDestination": { + "description": "The Google Cloud Storage output destination configuration.", + "id": "GoogleCloudRetailV2OutputConfigGcsDestination", + "properties": { + "outputUriPrefix": { + "description": "Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2OutputResult": { + "description": "Output result that stores the information about where the exported data is stored.", + "id": "GoogleCloudRetailV2OutputResult", + "properties": { + "bigqueryResult": { + "description": "The BigQuery location where the result is stored.", + "items": { + "$ref": "GoogleCloudRetailV2BigQueryOutputResult" + }, + "type": "array" + }, + "gcsResult": { + "description": "The Google Cloud Storage location where the result is stored.", + "items": { + "$ref": "GoogleCloudRetailV2GcsOutputResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2PauseModelRequest": { "description": "Request for pausing training of a model.", "id": "GoogleCloudRetailV2PauseModelRequest", diff --git a/retail/v2/retail-gen.go b/retail/v2/retail-gen.go index 6238eb75299..78e570f56ff 100644 --- a/retail/v2/retail-gen.go +++ b/retail/v2/retail-gen.go @@ -942,6 +942,37 @@ func (s *GoogleCloudRetailV2Audience) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2BigQueryOutputResult: A BigQuery output result. +type GoogleCloudRetailV2BigQueryOutputResult struct { + // DatasetId: The ID of a BigQuery Dataset. + DatasetId string `json:"datasetId,omitempty"` + + // TableId: The ID of a BigQuery Table. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2BigQueryOutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2BigQueryOutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2BigQuerySource: BigQuery source import data from. type GoogleCloudRetailV2BigQuerySource struct { // DataSchema: The schema to use when parsing the data from the source. @@ -2134,6 +2165,120 @@ func (s *GoogleCloudRetailV2ExperimentInfoServingConfigExperiment) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ExportAnalyticsMetricsRequest: Request message for +// the `ExportAnalyticsMetrics` method. +type GoogleCloudRetailV2ExportAnalyticsMetricsRequest struct { + // Filter: A filtering expression to specify restrictions on returned + // metrics. The expression is a sequence of terms. Each term applies a + // restriction to the returned metrics. Use this expression to restrict + // results to a specific time range. Currently we expect only one types + // of fields: * `timestamp`: This can be specified twice, once with a + // less than operator and once with a greater than operator. The + // `timestamp` restriction should result in one, contiguous, valid, + // `timestamp` range. Some examples of valid filters expressions: * + // Example 1: `timestamp > "2012-04-23T18:25:43.511Z" timestamp < + // "2012-04-23T18:30:43.511Z" * Example 2: `timestamp > + // "2012-04-23T18:25:43.511Z" + Filter string `json:"filter,omitempty"` + + // OutputConfig: Required. The output location of the data. + OutputConfig *GoogleCloudRetailV2OutputConfig `json:"outputConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportAnalyticsMetricsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportAnalyticsMetricsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2ExportAnalyticsMetricsResponse: Response of the +// ExportAnalyticsMetricsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudRetailV2ExportAnalyticsMetricsResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ErrorsConfig: This field is never set. + ErrorsConfig *GoogleCloudRetailV2ExportErrorsConfig `json:"errorsConfig,omitempty"` + + // OutputResult: Output result indicating where the data were exported + // to. + OutputResult *GoogleCloudRetailV2OutputResult `json:"outputResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportAnalyticsMetricsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportAnalyticsMetricsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2ExportErrorsConfig: Configuration of destination +// for Export related errors. +type GoogleCloudRetailV2ExportErrorsConfig struct { + // GcsPrefix: Google Cloud Storage path for import errors. This must be + // an empty, existing Cloud Storage bucket. Export errors will be + // written to a file in this bucket, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportErrorsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2FulfillmentInfo: Fulfillment information, such as // the store IDs for in-store pickup or region IDs for different // shipping methods. @@ -2179,6 +2324,34 @@ func (s *GoogleCloudRetailV2FulfillmentInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2GcsOutputResult: A Gcs output result. +type GoogleCloudRetailV2GcsOutputResult struct { + // OutputUri: The uri of Gcs output + OutputUri string `json:"outputUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OutputUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2GcsOutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2GcsOutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2GcsSource: Google Cloud Storage location for input // content. type GoogleCloudRetailV2GcsSource struct { @@ -3223,6 +3396,147 @@ func (s *GoogleCloudRetailV2ModelServingConfigList) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2OutputConfig: The output configuration setting. +type GoogleCloudRetailV2OutputConfig struct { + // BigqueryDestination: The BigQuery location where the output is to be + // written to. + BigqueryDestination *GoogleCloudRetailV2OutputConfigBigQueryDestination `json:"bigqueryDestination,omitempty"` + + // GcsDestination: The Google Cloud Storage location where the output is + // to be written to. + GcsDestination *GoogleCloudRetailV2OutputConfigGcsDestination `json:"gcsDestination,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigqueryDestination") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BigqueryDestination") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2OutputConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2OutputConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2OutputConfigBigQueryDestination: The BigQuery +// output destination configuration. +type GoogleCloudRetailV2OutputConfigBigQueryDestination struct { + // DatasetId: Required. The ID of a BigQuery Dataset. + DatasetId string `json:"datasetId,omitempty"` + + // TableIdPrefix: Required. The prefix of exported BigQuery tables. + TableIdPrefix string `json:"tableIdPrefix,omitempty"` + + // TableType: Required. Describes the table type. The following values + // are supported: * `table`: A BigQuery native table. * `view`: A + // virtual table defined by a SQL query. + TableType string `json:"tableType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2OutputConfigBigQueryDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2OutputConfigBigQueryDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2OutputConfigGcsDestination: The Google Cloud +// Storage output destination configuration. +type GoogleCloudRetailV2OutputConfigGcsDestination struct { + // OutputUriPrefix: Required. The output uri prefix for saving output + // data to json files. Some mapping examples are as follows: + // output_uri_prefix sample output(assuming the object is foo.json) + // ======================== + // ============================================= gs://bucket/ + // gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json + // gs://bucket/folder/item_ gs://bucket/folder/item_foo.json + OutputUriPrefix string `json:"outputUriPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUriPrefix") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OutputUriPrefix") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2OutputConfigGcsDestination) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2OutputConfigGcsDestination + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2OutputResult: Output result that stores the +// information about where the exported data is stored. +type GoogleCloudRetailV2OutputResult struct { + // BigqueryResult: The BigQuery location where the result is stored. + BigqueryResult []*GoogleCloudRetailV2BigQueryOutputResult `json:"bigqueryResult,omitempty"` + + // GcsResult: The Google Cloud Storage location where the result is + // stored. + GcsResult []*GoogleCloudRetailV2GcsOutputResult `json:"gcsResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigqueryResult") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BigqueryResult") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2OutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2OutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2PauseModelRequest: Request for pausing training of // a model. type GoogleCloudRetailV2PauseModelRequest struct { @@ -10157,6 +10471,151 @@ func (c *ProjectsLocationsCatalogsCompleteQueryCall) Do(opts ...googleapi.CallOp } +// method id "retail.projects.locations.catalogs.exportAnalyticsMetrics": + +type ProjectsLocationsCatalogsExportAnalyticsMetricsCall struct { + s *Service + catalog string + googlecloudretailv2exportanalyticsmetricsrequest *GoogleCloudRetailV2ExportAnalyticsMetricsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportAnalyticsMetrics: Exports analytics metrics. +// `Operation.response` is of type `ExportAnalyticsMetricsResponse`. +// `Operation.metadata` is of type `ExportMetadata`. +// +// - catalog: Full resource name of the parent catalog. Expected format: +// `projects/*/locations/*/catalogs/*`. +func (r *ProjectsLocationsCatalogsService) ExportAnalyticsMetrics(catalog string, googlecloudretailv2exportanalyticsmetricsrequest *GoogleCloudRetailV2ExportAnalyticsMetricsRequest) *ProjectsLocationsCatalogsExportAnalyticsMetricsCall { + c := &ProjectsLocationsCatalogsExportAnalyticsMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.catalog = catalog + c.googlecloudretailv2exportanalyticsmetricsrequest = googlecloudretailv2exportanalyticsmetricsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCatalogsExportAnalyticsMetricsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Context(ctx context.Context) *ProjectsLocationsCatalogsExportAnalyticsMetricsCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudretailv2exportanalyticsmetricsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+catalog}:exportAnalyticsMetrics") + 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{ + "catalog": c.catalog, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "retail.projects.locations.catalogs.exportAnalyticsMetrics" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// 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 *ProjectsLocationsCatalogsExportAnalyticsMetricsCall) 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 + // { + // "description": "Exports analytics metrics. `Operation.response` is of type `ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type `ExportMetadata`.", + // "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:exportAnalyticsMetrics", + // "httpMethod": "POST", + // "id": "retail.projects.locations.catalogs.exportAnalyticsMetrics", + // "parameterOrder": [ + // "catalog" + // ], + // "parameters": { + // "catalog": { + // "description": "Required. Full resource name of the parent catalog. Expected format: `projects/*/locations/*/catalogs/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v2/{+catalog}:exportAnalyticsMetrics", + // "request": { + // "$ref": "GoogleCloudRetailV2ExportAnalyticsMetricsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "retail.projects.locations.catalogs.getAttributesConfig": type ProjectsLocationsCatalogsGetAttributesConfigCall struct { diff --git a/retail/v2alpha/retail-api.json b/retail/v2alpha/retail-api.json index 101af84353d..61b0b91a7ef 100644 --- a/retail/v2alpha/retail-api.json +++ b/retail/v2alpha/retail-api.json @@ -2416,7 +2416,7 @@ } } }, - "revision": "20240129", + "revision": "20240207", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2593,6 +2593,21 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2BigQueryOutputResult": { + "description": "A BigQuery output result.", + "id": "GoogleCloudRetailV2BigQueryOutputResult", + "properties": { + "datasetId": { + "description": "The ID of a BigQuery Dataset.", + "type": "string" + }, + "tableId": { + "description": "The ID of a BigQuery Table.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2CreateModelMetadata": { "description": "Metadata associated with a create operation.", "id": "GoogleCloudRetailV2CreateModelMetadata", @@ -2604,6 +2619,50 @@ }, "type": "object" }, + "GoogleCloudRetailV2ExportAnalyticsMetricsResponse": { + "description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudRetailV2ExportAnalyticsMetricsResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "errorsConfig": { + "$ref": "GoogleCloudRetailV2ExportErrorsConfig", + "description": "This field is never set." + }, + "outputResult": { + "$ref": "GoogleCloudRetailV2OutputResult", + "description": "Output result indicating where the data were exported to." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2ExportErrorsConfig": { + "description": "Configuration of destination for Export related errors.", + "id": "GoogleCloudRetailV2ExportErrorsConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2GcsOutputResult": { + "description": "A Gcs output result.", + "id": "GoogleCloudRetailV2GcsOutputResult", + "properties": { + "outputUri": { + "description": "The uri of Gcs output", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ImportCompletionDataResponse": { "description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", "id": "GoogleCloudRetailV2ImportCompletionDataResponse", @@ -2885,6 +2944,27 @@ }, "type": "object" }, + "GoogleCloudRetailV2OutputResult": { + "description": "Output result that stores the information about where the exported data is stored.", + "id": "GoogleCloudRetailV2OutputResult", + "properties": { + "bigqueryResult": { + "description": "The BigQuery location where the result is stored.", + "items": { + "$ref": "GoogleCloudRetailV2BigQueryOutputResult" + }, + "type": "array" + }, + "gcsResult": { + "description": "The Google Cloud Storage location where the result is stored.", + "items": { + "$ref": "GoogleCloudRetailV2GcsOutputResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2PurgeMetadata": { "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudRetailV2PurgeMetadata", diff --git a/retail/v2alpha/retail-gen.go b/retail/v2alpha/retail-gen.go index c25068f4f33..dac3d482d50 100644 --- a/retail/v2alpha/retail-gen.go +++ b/retail/v2alpha/retail-gen.go @@ -712,6 +712,37 @@ type GoogleCloudRetailV2AddLocalInventoriesMetadata struct { type GoogleCloudRetailV2AddLocalInventoriesResponse struct { } +// GoogleCloudRetailV2BigQueryOutputResult: A BigQuery output result. +type GoogleCloudRetailV2BigQueryOutputResult struct { + // DatasetId: The ID of a BigQuery Dataset. + DatasetId string `json:"datasetId,omitempty"` + + // TableId: The ID of a BigQuery Table. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2BigQueryOutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2BigQueryOutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2CreateModelMetadata: Metadata associated with a // create operation. type GoogleCloudRetailV2CreateModelMetadata struct { @@ -744,6 +775,106 @@ func (s *GoogleCloudRetailV2CreateModelMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ExportAnalyticsMetricsResponse: Response of the +// ExportAnalyticsMetricsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudRetailV2ExportAnalyticsMetricsResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ErrorsConfig: This field is never set. + ErrorsConfig *GoogleCloudRetailV2ExportErrorsConfig `json:"errorsConfig,omitempty"` + + // OutputResult: Output result indicating where the data were exported + // to. + OutputResult *GoogleCloudRetailV2OutputResult `json:"outputResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportAnalyticsMetricsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportAnalyticsMetricsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2ExportErrorsConfig: Configuration of destination +// for Export related errors. +type GoogleCloudRetailV2ExportErrorsConfig struct { + // GcsPrefix: Google Cloud Storage path for import errors. This must be + // an empty, existing Cloud Storage bucket. Export errors will be + // written to a file in this bucket, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportErrorsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2GcsOutputResult: A Gcs output result. +type GoogleCloudRetailV2GcsOutputResult struct { + // OutputUri: The uri of Gcs output + OutputUri string `json:"outputUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OutputUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2GcsOutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2GcsOutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ImportCompletionDataResponse: Response of the // ImportCompletionDataRequest. If the long running operation is done, // this message is returned by the @@ -1211,6 +1342,40 @@ func (s *GoogleCloudRetailV2ModelServingConfigList) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2OutputResult: Output result that stores the +// information about where the exported data is stored. +type GoogleCloudRetailV2OutputResult struct { + // BigqueryResult: The BigQuery location where the result is stored. + BigqueryResult []*GoogleCloudRetailV2BigQueryOutputResult `json:"bigqueryResult,omitempty"` + + // GcsResult: The Google Cloud Storage location where the result is + // stored. + GcsResult []*GoogleCloudRetailV2GcsOutputResult `json:"gcsResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigqueryResult") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BigqueryResult") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2OutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2OutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2PurgeMetadata: Metadata related to the progress of // the Purge operation. This will be returned by the // google.longrunning.Operation.metadata field. diff --git a/retail/v2beta/retail-api.json b/retail/v2beta/retail-api.json index f2cec387e3d..881b220e939 100644 --- a/retail/v2beta/retail-api.json +++ b/retail/v2beta/retail-api.json @@ -2115,7 +2115,7 @@ } } }, - "revision": "20240129", + "revision": "20240207", "rootUrl": "https://retail.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -2292,6 +2292,21 @@ "properties": {}, "type": "object" }, + "GoogleCloudRetailV2BigQueryOutputResult": { + "description": "A BigQuery output result.", + "id": "GoogleCloudRetailV2BigQueryOutputResult", + "properties": { + "datasetId": { + "description": "The ID of a BigQuery Dataset.", + "type": "string" + }, + "tableId": { + "description": "The ID of a BigQuery Table.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2CreateModelMetadata": { "description": "Metadata associated with a create operation.", "id": "GoogleCloudRetailV2CreateModelMetadata", @@ -2303,6 +2318,50 @@ }, "type": "object" }, + "GoogleCloudRetailV2ExportAnalyticsMetricsResponse": { + "description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudRetailV2ExportAnalyticsMetricsResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "errorsConfig": { + "$ref": "GoogleCloudRetailV2ExportErrorsConfig", + "description": "This field is never set." + }, + "outputResult": { + "$ref": "GoogleCloudRetailV2OutputResult", + "description": "Output result indicating where the data were exported to." + } + }, + "type": "object" + }, + "GoogleCloudRetailV2ExportErrorsConfig": { + "description": "Configuration of destination for Export related errors.", + "id": "GoogleCloudRetailV2ExportErrorsConfig", + "properties": { + "gcsPrefix": { + "description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudRetailV2GcsOutputResult": { + "description": "A Gcs output result.", + "id": "GoogleCloudRetailV2GcsOutputResult", + "properties": { + "outputUri": { + "description": "The uri of Gcs output", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudRetailV2ImportCompletionDataResponse": { "description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", "id": "GoogleCloudRetailV2ImportCompletionDataResponse", @@ -2584,6 +2643,27 @@ }, "type": "object" }, + "GoogleCloudRetailV2OutputResult": { + "description": "Output result that stores the information about where the exported data is stored.", + "id": "GoogleCloudRetailV2OutputResult", + "properties": { + "bigqueryResult": { + "description": "The BigQuery location where the result is stored.", + "items": { + "$ref": "GoogleCloudRetailV2BigQueryOutputResult" + }, + "type": "array" + }, + "gcsResult": { + "description": "The Google Cloud Storage location where the result is stored.", + "items": { + "$ref": "GoogleCloudRetailV2GcsOutputResult" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudRetailV2PurgeMetadata": { "description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudRetailV2PurgeMetadata", diff --git a/retail/v2beta/retail-gen.go b/retail/v2beta/retail-gen.go index bb421fc321c..bf6f4e84c2e 100644 --- a/retail/v2beta/retail-gen.go +++ b/retail/v2beta/retail-gen.go @@ -664,6 +664,37 @@ type GoogleCloudRetailV2AddLocalInventoriesMetadata struct { type GoogleCloudRetailV2AddLocalInventoriesResponse struct { } +// GoogleCloudRetailV2BigQueryOutputResult: A BigQuery output result. +type GoogleCloudRetailV2BigQueryOutputResult struct { + // DatasetId: The ID of a BigQuery Dataset. + DatasetId string `json:"datasetId,omitempty"` + + // TableId: The ID of a BigQuery Table. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatasetId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatasetId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2BigQueryOutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2BigQueryOutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2CreateModelMetadata: Metadata associated with a // create operation. type GoogleCloudRetailV2CreateModelMetadata struct { @@ -696,6 +727,106 @@ func (s *GoogleCloudRetailV2CreateModelMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2ExportAnalyticsMetricsResponse: Response of the +// ExportAnalyticsMetricsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudRetailV2ExportAnalyticsMetricsResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ErrorsConfig: This field is never set. + ErrorsConfig *GoogleCloudRetailV2ExportErrorsConfig `json:"errorsConfig,omitempty"` + + // OutputResult: Output result indicating where the data were exported + // to. + OutputResult *GoogleCloudRetailV2OutputResult `json:"outputResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportAnalyticsMetricsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportAnalyticsMetricsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2ExportErrorsConfig: Configuration of destination +// for Export related errors. +type GoogleCloudRetailV2ExportErrorsConfig struct { + // GcsPrefix: Google Cloud Storage path for import errors. This must be + // an empty, existing Cloud Storage bucket. Export errors will be + // written to a file in this bucket, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2ExportErrorsConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2ExportErrorsConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudRetailV2GcsOutputResult: A Gcs output result. +type GoogleCloudRetailV2GcsOutputResult struct { + // OutputUri: The uri of Gcs output + OutputUri string `json:"outputUri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "OutputUri") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "OutputUri") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2GcsOutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2GcsOutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2ImportCompletionDataResponse: Response of the // ImportCompletionDataRequest. If the long running operation is done, // this message is returned by the @@ -1163,6 +1294,40 @@ func (s *GoogleCloudRetailV2ModelServingConfigList) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudRetailV2OutputResult: Output result that stores the +// information about where the exported data is stored. +type GoogleCloudRetailV2OutputResult struct { + // BigqueryResult: The BigQuery location where the result is stored. + BigqueryResult []*GoogleCloudRetailV2BigQueryOutputResult `json:"bigqueryResult,omitempty"` + + // GcsResult: The Google Cloud Storage location where the result is + // stored. + GcsResult []*GoogleCloudRetailV2GcsOutputResult `json:"gcsResult,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigqueryResult") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BigqueryResult") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudRetailV2OutputResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudRetailV2OutputResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudRetailV2PurgeMetadata: Metadata related to the progress of // the Purge operation. This will be returned by the // google.longrunning.Operation.metadata field. diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 68382f86999..e66b1fbaa5b 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2657,7 +2657,7 @@ } } }, - "revision": "20240205", + "revision": "20240206", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -2787,7 +2787,8 @@ "id": "AppLinkDataAppLinkInfoAppTarget", "properties": { "targetUri": { - "$ref": "Uri" + "$ref": "Uri", + "description": "URI for AppTarget. The description on the URI must be set." } }, "type": "object" diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 53bad66d4bd..f4d357a2463 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -644,6 +644,7 @@ func (s *AppLinkDataAppLinkInfo) MarshalJSON() ([]byte, error) { } type AppLinkDataAppLinkInfoAppTarget struct { + // TargetUri: URI for AppTarget. The description on the URI must be set. TargetUri *Uri `json:"targetUri,omitempty"` // ForceSendFields is a list of field names (e.g. "TargetUri") to