diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index 795746a8f26..1cd87d29b14 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -16238,7 +16238,7 @@ } } }, - "revision": "20240510", + "revision": "20240520", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionFilteredText": { @@ -16246,7 +16246,7 @@ "id": "CloudAiLargeModelsVisionFilteredText", "properties": { "category": { - "description": "Confidence level", + "description": "Filtered category", "enum": [ "RAI_CATEGORY_UNSPECIFIED", "OBSCENE", @@ -16267,6 +16267,7 @@ "SENSITIVE_WORD", "PERSON_IMG", "ICA_IMG", + "AGILE_ICA_IMG", "SEXUAL_IMG", "IU_IMG", "RACY_IMG", @@ -16283,7 +16284,8 @@ "DANGEROUS_CONTENT", "RECITATION_TEXT", "CELEBRITY_IMG", - "WATERMARK_IMG_REMOVAL" + "WATERMARK_IMG_REMOVAL", + "RAID_IMG" ], "enumDescriptions": [ "", @@ -16305,6 +16307,7 @@ "", "", "", + "Agile ICA label currently for evaluation only.", "", "", "", @@ -16321,12 +16324,13 @@ "Text category from SafetyCat v3", "", "", - "Error message when user attempts to remove watermark from editing image" + "Error message when user attempts to remove watermark from editing image", + "" ], "type": "string" }, "confidence": { - "description": "Filtered category", + "description": "Confidence score", "enum": [ "CONFIDENCE_UNSPECIFIED", "CONFIDENCE_LOW", @@ -16494,6 +16498,12 @@ "CloudAiLargeModelsVisionRaiInfo": { "id": "CloudAiLargeModelsVisionRaiInfo", "properties": { + "detectedLabels": { + "items": { + "$ref": "CloudAiLargeModelsVisionRaiInfoDetectedLabels" + }, + "type": "array" + }, "raiCategories": { "description": "List of rai categories' information to return", "items": { @@ -16512,6 +16522,32 @@ }, "type": "object" }, + "CloudAiLargeModelsVisionRaiInfoDetectedLabels": { + "description": "Filters which return labels with confidence scores.", + "id": "CloudAiLargeModelsVisionRaiInfoDetectedLabels", + "properties": { + "descriptions": { + "description": "Descriptions of the detected labels.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raiCategory": { + "description": "The RAI category for the deteceted labels.", + "type": "string" + }, + "scores": { + "description": "Confidence scores mapping to the labels.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, "CloudAiLargeModelsVisionSemanticFilterResponse": { "id": "CloudAiLargeModelsVisionSemanticFilterResponse", "properties": { @@ -19407,9 +19443,21 @@ "$ref": "GoogleCloudAiplatformV1DedicatedResources", "description": "Required. The underlying DedicatedResources that the DeploymentResourcePool uses." }, + "disableContainerLogging": { + "description": "If the DeploymentResourcePool is deployed with custom-trained Models or AutoML Tabular Models, the container(s) of the DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.", + "type": "boolean" + }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1EncryptionSpec", + "description": "Customer-managed encryption key spec for a DeploymentResourcePool. If set, this DeploymentResourcePool will be secured by this key. Endpoints and the DeploymentResourcePool they deploy in need to have the same EncryptionSpec." + }, "name": { "description": "Immutable. The resource name of the DeploymentResourcePool. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`", "type": "string" + }, + "serviceAccount": { + "description": "The service account that the DeploymentResourcePool's container(s) run as. Specify the email address of the service account. If this service account is not specified, the container(s) run as a service account that doesn't have access to the resource project. Users deploying the Models to this DeploymentResourcePool must have the `iam.serviceAccounts.actAs` permission on this service account.", + "type": "string" } }, "type": "object" @@ -20867,7 +20915,8 @@ "INT64_ARRAY", "STRING", "STRING_ARRAY", - "BYTES" + "BYTES", + "STRUCT" ], "enumDescriptions": [ "The value type is unspecified.", @@ -20879,7 +20928,8 @@ "Used for Feature that is a list of INT64.", "Used for Feature that is string.", "Used for Feature that is a list of String.", - "Used for Feature that is bytes." + "Used for Feature that is bytes.", + "Used for Feature that is struct." ], "type": "string" }, @@ -21214,6 +21264,10 @@ "stringValue": { "description": "String feature value.", "type": "string" + }, + "structValue": { + "$ref": "GoogleCloudAiplatformV1StructValue", + "description": "A struct type feature value." } }, "type": "object" @@ -22208,22 +22262,6 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, - "responseStyle": { - "description": "Optional. Control Three levels of creativity in the model output. Default: RESPONSE_STYLE_BALANCED", - "enum": [ - "RESPONSE_STYLE_UNSPECIFIED", - "RESPONSE_STYLE_PRECISE", - "RESPONSE_STYLE_BALANCED", - "RESPONSE_STYLE_CREATIVE" - ], - "enumDescriptions": [ - "response style unspecified.", - "Precise response.", - "Default response style.", - "Creative response style." - ], - "type": "string" - }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -22287,6 +22325,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1GoogleSearchRetrieval": { + "description": "Tool to retrieve public web data for grounding, powered by Google.", + "id": "GoogleCloudAiplatformV1GoogleSearchRetrieval", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1GroundingMetadata": { "description": "Metadata returned to client when grounding is enabled.", "id": "GoogleCloudAiplatformV1GroundingMetadata", @@ -24174,6 +24218,10 @@ "readOnly": true, "type": "string" }, + "dataplexConfig": { + "$ref": "GoogleCloudAiplatformV1MetadataStoreDataplexConfig", + "description": "Optional. Dataplex integration settings." + }, "description": { "description": "Description of the MetadataStore.", "type": "string" @@ -24201,6 +24249,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1MetadataStoreDataplexConfig": { + "description": "Represents Dataplex integration settings.", + "id": "GoogleCloudAiplatformV1MetadataStoreDataplexConfig", + "properties": { + "enabledPipelinesLineage": { + "description": "Optional. Whether or not Data Lineage synchronization is enabled for Vertex Pipelines.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1MetadataStoreMetadataStoreState": { "description": "Represents state information for a MetadataStore.", "id": "GoogleCloudAiplatformV1MetadataStoreMetadataStoreState", @@ -26306,40 +26365,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1NotebookReservationAffinity": { - "description": "Notebook Reservation Affinity for consuming Zonal reservation.", - "id": "GoogleCloudAiplatformV1NotebookReservationAffinity", - "properties": { - "consumeReservationType": { - "description": "Required. Specifies the type of reservation from which this instance can consume resources: RESERVATION_ANY (default), RESERVATION_SPECIFIC, or RESERVATION_NONE. See Consuming reserved instances for examples.", - "enum": [ - "RESERVATION_AFFINITY_TYPE_UNSPECIFIED", - "RESERVATION_NONE", - "RESERVATION_ANY", - "RESERVATION_SPECIFIC" - ], - "enumDescriptions": [ - "Default type.", - "Do not consume from any allocated capacity.", - "Consume any reservation available.", - "Must consume from a specific reservation. Must specify key value fields for specifying the reservations." - ], - "type": "string" - }, - "key": { - "description": "Optional. Corresponds to the label key of a reservation resource. To target a RESERVATION_SPECIFIC by name, use compute.googleapis.com/reservation-name as the key and specify the name of your reservation as its value.", - "type": "string" - }, - "values": { - "description": "Optional. Corresponds to the label values of a reservation resource. This must be the full path name of Reservation.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1NotebookRuntime": { "description": "A runtime is a virtual machine allocated to a particular user for a particular Notebook file on temporary basis with lifetime limited to 24 hours.", "id": "GoogleCloudAiplatformV1NotebookRuntime", @@ -26379,6 +26404,11 @@ "readOnly": true, "type": "string" }, + "idleShutdownConfig": { + "$ref": "GoogleCloudAiplatformV1NotebookIdleShutdownConfig", + "description": "Output only. The idle shutdown configuration of the notebook runtime.", + "readOnly": true + }, "isUpgradable": { "description": "Output only. Whether NotebookRuntime is upgradable.", "readOnly": true, @@ -26428,11 +26458,6 @@ "readOnly": true, "type": "string" }, - "reservationAffinity": { - "$ref": "GoogleCloudAiplatformV1NotebookReservationAffinity", - "description": "Output only. Reservation Affinity of the notebook runtime.", - "readOnly": true - }, "runtimeState": { "description": "Output only. The runtime (instance) state of the NotebookRuntime.", "enum": [ @@ -26513,6 +26538,10 @@ "description": "Required. The display name of the NotebookRuntimeTemplate. The name can be up to 128 characters long and can consist of any UTF-8 characters.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1EncryptionSpec", + "description": "Customer-managed encryption key spec for the notebook runtime." + }, "etag": { "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -26570,10 +26599,6 @@ ], "type": "string" }, - "reservationAffinity": { - "$ref": "GoogleCloudAiplatformV1NotebookReservationAffinity", - "description": "Optional. Reservation Affinity of the notebook runtime template." - }, "serviceAccount": { "description": "The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", "type": "string" @@ -27429,7 +27454,7 @@ "properties": { "exec": { "$ref": "GoogleCloudAiplatformV1ProbeExecAction", - "description": "Exec specifies the action to take." + "description": "ExecAction probes the health of a container by executing a command." }, "periodSeconds": { "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument 'periodSeconds'.", @@ -28024,10 +28049,41 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1RayMetricSpec": { + "description": "Configuration for the Ray metrics.", + "id": "GoogleCloudAiplatformV1RayMetricSpec", + "properties": { + "disabled": { + "description": "Optional. Flag to disable the Ray metrics collection.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1RaySpec": { "description": "Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes.", "id": "GoogleCloudAiplatformV1RaySpec", - "properties": {}, + "properties": { + "headNodeResourcePoolId": { + "description": "Optional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn't set.", + "type": "string" + }, + "imageUri": { + "description": "Optional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from [Vertex prebuilt images](https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field.", + "type": "string" + }, + "rayMetricSpec": { + "$ref": "GoogleCloudAiplatformV1RayMetricSpec", + "description": "Optional. Ray metrics configurations." + }, + "resourcePoolImages": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Required if image_uri isn't set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { \"ray_head_node_pool\": \"head image\" \"ray_worker_node_pool1\": \"worker image\" \"ray_worker_node_pool2\": \"another worker image\" }", + "type": "object" + } + }, "type": "object" }, "GoogleCloudAiplatformV1ReadFeatureValuesRequest": { @@ -28350,7 +28406,16 @@ "GoogleCloudAiplatformV1ResourceRuntime": { "description": "Persistent Cluster runtime information as output", "id": "GoogleCloudAiplatformV1ResourceRuntime", - "properties": {}, + "properties": { + "accessUris": { + "additionalProperties": { + "type": "string" + }, + "description": "Output only. URIs for user to connect to the Cluster. Example: { \"RAY_HEAD_NODE_INTERNAL_IP\": \"head-node-IP:10001\" \"RAY_DASHBOARD_URI\": \"ray-dashboard-address:8888\" }", + "readOnly": true, + "type": "object" + } + }, "type": "object" }, "GoogleCloudAiplatformV1ResourceRuntimeSpec": { @@ -30879,6 +30944,10 @@ "$ref": "GoogleCloudAiplatformV1SchemaPredictParamsGroundingConfig", "description": "Grounding checking configuration." }, + "hasPromptVariable": { + "description": "Whether the prompt dataset has prompt variable.", + "type": "boolean" + }, "maxOutputTokens": { "description": "Value of the maximum number of tokens generated set when the dataset was saved.", "format": "int64", @@ -33155,6 +33224,35 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1StructFieldValue": { + "description": "One field of a Struct (or object) type feature value.", + "id": "GoogleCloudAiplatformV1StructFieldValue", + "properties": { + "name": { + "description": "Name of the field in the struct feature.", + "type": "string" + }, + "value": { + "$ref": "GoogleCloudAiplatformV1FeatureValue", + "description": "The value for this field." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1StructValue": { + "description": "Struct (or object) type feature value.", + "id": "GoogleCloudAiplatformV1StructValue", + "properties": { + "values": { + "description": "A list of field values.", + "items": { + "$ref": "GoogleCloudAiplatformV1StructFieldValue" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Study": { "description": "A message representing a Study.", "id": "GoogleCloudAiplatformV1Study", @@ -34499,6 +34597,10 @@ }, "type": "array" }, + "googleSearchRetrieval": { + "$ref": "GoogleCloudAiplatformV1GoogleSearchRetrieval", + "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." + }, "retrieval": { "$ref": "GoogleCloudAiplatformV1Retrieval", "description": "Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation." diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index cd5ddee168d..0c44acf27e9 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1291,7 +1291,7 @@ type PublishersModelsService struct { // CloudAiLargeModelsVisionFilteredText: Details for filtered input text. type CloudAiLargeModelsVisionFilteredText struct { - // Category: Confidence level + // Category: Filtered category // // Possible values: // "RAI_CATEGORY_UNSPECIFIED" @@ -1313,6 +1313,7 @@ type CloudAiLargeModelsVisionFilteredText struct { // "SENSITIVE_WORD" // "PERSON_IMG" // "ICA_IMG" + // "AGILE_ICA_IMG" - Agile ICA label currently for evaluation only. // "SEXUAL_IMG" // "IU_IMG" // "RACY_IMG" @@ -1331,8 +1332,9 @@ type CloudAiLargeModelsVisionFilteredText struct { // "CELEBRITY_IMG" // "WATERMARK_IMG_REMOVAL" - Error message when user attempts to remove // watermark from editing image + // "RAID_IMG" Category string `json:"category,omitempty"` - // Confidence: Filtered category + // Confidence: Confidence score // // Possible values: // "CONFIDENCE_UNSPECIFIED" @@ -1554,20 +1556,21 @@ func (s *CloudAiLargeModelsVisionNamedBoundingBox) UnmarshalJSON(data []byte) er } type CloudAiLargeModelsVisionRaiInfo struct { + DetectedLabels []*CloudAiLargeModelsVisionRaiInfoDetectedLabels `json:"detectedLabels,omitempty"` // RaiCategories: List of rai categories' information to return RaiCategories []string `json:"raiCategories,omitempty"` // Scores: List of rai scores mapping to the rai categories. Rounded to 1 // decimal place. Scores []float64 `json:"scores,omitempty"` - // ForceSendFields is a list of field names (e.g. "RaiCategories") to + // ForceSendFields is a list of field names (e.g. "DetectedLabels") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RaiCategories") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DetectedLabels") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1594,6 +1597,50 @@ func (s *CloudAiLargeModelsVisionRaiInfo) UnmarshalJSON(data []byte) error { return nil } +// CloudAiLargeModelsVisionRaiInfoDetectedLabels: Filters which return labels +// with confidence scores. +type CloudAiLargeModelsVisionRaiInfoDetectedLabels struct { + // Descriptions: Descriptions of the detected labels. + Descriptions []string `json:"descriptions,omitempty"` + // RaiCategory: The RAI category for the deteceted labels. + RaiCategory string `json:"raiCategory,omitempty"` + // Scores: Confidence scores mapping to the labels. + Scores []float64 `json:"scores,omitempty"` + // ForceSendFields is a list of field names (e.g. "Descriptions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Descriptions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *CloudAiLargeModelsVisionRaiInfoDetectedLabels) MarshalJSON() ([]byte, error) { + type NoMethod CloudAiLargeModelsVisionRaiInfoDetectedLabels + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *CloudAiLargeModelsVisionRaiInfoDetectedLabels) UnmarshalJSON(data []byte) error { + type NoMethod CloudAiLargeModelsVisionRaiInfoDetectedLabels + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + type CloudAiLargeModelsVisionSemanticFilterResponse struct { // NamedBoundingBoxes: Class labels of the bounding boxes that failed the // semantic filtering. Bounding box coordinates. @@ -5907,10 +5954,29 @@ type GoogleCloudAiplatformV1DeploymentResourcePool struct { // DedicatedResources: Required. The underlying DedicatedResources that the // DeploymentResourcePool uses. DedicatedResources *GoogleCloudAiplatformV1DedicatedResources `json:"dedicatedResources,omitempty"` + // DisableContainerLogging: If the DeploymentResourcePool is deployed with + // custom-trained Models or AutoML Tabular Models, the container(s) of the + // DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud + // Logging by default. Please note that the logs incur cost, which are subject + // to Cloud Logging pricing (https://cloud.google.com/logging/pricing). User + // can disable container logging by setting this flag to true. + DisableContainerLogging bool `json:"disableContainerLogging,omitempty"` + // EncryptionSpec: Customer-managed encryption key spec for a + // DeploymentResourcePool. If set, this DeploymentResourcePool will be secured + // by this key. Endpoints and the DeploymentResourcePool they deploy in need to + // have the same EncryptionSpec. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` // Name: Immutable. The resource name of the DeploymentResourcePool. Format: // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_ // resource_pool}` Name string `json:"name,omitempty"` + // ServiceAccount: The service account that the DeploymentResourcePool's + // container(s) run as. Specify the email address of the service account. If + // this service account is not specified, the container(s) run as a service + // account that doesn't have access to the resource project. Users deploying + // the Models to this DeploymentResourcePool must have the + // `iam.serviceAccounts.actAs` permission on this service account. + ServiceAccount string `json:"serviceAccount,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -8050,6 +8116,7 @@ type GoogleCloudAiplatformV1Feature struct { // "STRING" - Used for Feature that is string. // "STRING_ARRAY" - Used for Feature that is a list of String. // "BYTES" - Used for Feature that is bytes. + // "STRUCT" - Used for Feature that is struct. ValueType string `json:"valueType,omitempty"` // VersionColumnName: Only applicable for Vertex AI Feature Store. The name of // the BigQuery Table/View column hosting data for this version. If no value is @@ -8537,6 +8604,8 @@ type GoogleCloudAiplatformV1FeatureValue struct { StringArrayValue *GoogleCloudAiplatformV1StringArray `json:"stringArrayValue,omitempty"` // StringValue: String feature value. StringValue string `json:"stringValue,omitempty"` + // StructValue: A struct type feature value. + StructValue *GoogleCloudAiplatformV1StructValue `json:"structValue,omitempty"` // ForceSendFields is a list of field names (e.g. "BoolArrayValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -10106,15 +10175,6 @@ type GoogleCloudAiplatformV1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` - // ResponseStyle: Optional. Control Three levels of creativity in the model - // output. Default: RESPONSE_STYLE_BALANCED - // - // Possible values: - // "RESPONSE_STYLE_UNSPECIFIED" - response style unspecified. - // "RESPONSE_STYLE_PRECISE" - Precise response. - // "RESPONSE_STYLE_BALANCED" - Default response style. - // "RESPONSE_STYLE_CREATIVE" - Creative response style. - ResponseStyle string `json:"responseStyle,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. @@ -10217,6 +10277,11 @@ func (s *GoogleCloudAiplatformV1GenieSource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1GoogleSearchRetrieval: Tool to retrieve public web +// data for grounding, powered by Google. +type GoogleCloudAiplatformV1GoogleSearchRetrieval struct { +} + // GoogleCloudAiplatformV1GroundingMetadata: Metadata returned to client when // grounding is enabled. type GoogleCloudAiplatformV1GroundingMetadata struct { @@ -12944,6 +13009,8 @@ func (s *GoogleCloudAiplatformV1MetadataSchema) MarshalJSON() ([]byte, error) { type GoogleCloudAiplatformV1MetadataStore struct { // CreateTime: Output only. Timestamp when this MetadataStore was created. CreateTime string `json:"createTime,omitempty"` + // DataplexConfig: Optional. Dataplex integration settings. + DataplexConfig *GoogleCloudAiplatformV1MetadataStoreDataplexConfig `json:"dataplexConfig,omitempty"` // Description: Description of the MetadataStore. Description string `json:"description,omitempty"` // EncryptionSpec: Customer-managed encryption key spec for a Metadata Store. @@ -12977,6 +13044,30 @@ func (s *GoogleCloudAiplatformV1MetadataStore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1MetadataStoreDataplexConfig: Represents Dataplex +// integration settings. +type GoogleCloudAiplatformV1MetadataStoreDataplexConfig struct { + // EnabledPipelinesLineage: Optional. Whether or not Data Lineage + // synchronization is enabled for Vertex Pipelines. + EnabledPipelinesLineage bool `json:"enabledPipelinesLineage,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnabledPipelinesLineage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnabledPipelinesLineage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1MetadataStoreDataplexConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1MetadataStoreDataplexConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1MetadataStoreMetadataStoreState: Represents state // information for a MetadataStore. type GoogleCloudAiplatformV1MetadataStoreMetadataStoreState struct { @@ -15926,47 +16017,6 @@ func (s *GoogleCloudAiplatformV1NotebookIdleShutdownConfig) MarshalJSON() ([]byt return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1NotebookReservationAffinity: Notebook Reservation -// Affinity for consuming Zonal reservation. -type GoogleCloudAiplatformV1NotebookReservationAffinity struct { - // ConsumeReservationType: Required. Specifies the type of reservation from - // which this instance can consume resources: RESERVATION_ANY (default), - // RESERVATION_SPECIFIC, or RESERVATION_NONE. See Consuming reserved instances - // for examples. - // - // Possible values: - // "RESERVATION_AFFINITY_TYPE_UNSPECIFIED" - Default type. - // "RESERVATION_NONE" - Do not consume from any allocated capacity. - // "RESERVATION_ANY" - Consume any reservation available. - // "RESERVATION_SPECIFIC" - Must consume from a specific reservation. Must - // specify key value fields for specifying the reservations. - ConsumeReservationType string `json:"consumeReservationType,omitempty"` - // Key: Optional. Corresponds to the label key of a reservation resource. To - // target a RESERVATION_SPECIFIC by name, use - // compute.googleapis.com/reservation-name as the key and specify the name of - // your reservation as its value. - Key string `json:"key,omitempty"` - // Values: Optional. Corresponds to the label values of a reservation resource. - // This must be the full path name of Reservation. - Values []string `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConsumeReservationType") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConsumeReservationType") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1NotebookReservationAffinity) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1NotebookReservationAffinity - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1NotebookRuntime: A runtime is a virtual machine // allocated to a particular user for a particular Notebook file on temporary // basis with lifetime limited to 24 hours. @@ -15992,6 +16042,9 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { // "UNHEALTHY" - NotebookRuntime is in unhealthy state. Applies to ACTIVE // state. HealthState string `json:"healthState,omitempty"` + // IdleShutdownConfig: Output only. The idle shutdown configuration of the + // notebook runtime. + IdleShutdownConfig *GoogleCloudAiplatformV1NotebookIdleShutdownConfig `json:"idleShutdownConfig,omitempty"` // IsUpgradable: Output only. Whether NotebookRuntime is upgradable. IsUpgradable bool `json:"isUpgradable,omitempty"` // Labels: The labels with user-defined metadata to organize your @@ -16030,9 +16083,6 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { // ProxyUri: Output only. The proxy endpoint used to access the // NotebookRuntime. ProxyUri string `json:"proxyUri,omitempty"` - // ReservationAffinity: Output only. Reservation Affinity of the notebook - // runtime. - ReservationAffinity *GoogleCloudAiplatformV1NotebookReservationAffinity `json:"reservationAffinity,omitempty"` // RuntimeState: Output only. The runtime (instance) state of the // NotebookRuntime. // @@ -16099,6 +16149,9 @@ type GoogleCloudAiplatformV1NotebookRuntimeTemplate struct { // name can be up to 128 characters long and can consist of any UTF-8 // characters. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Customer-managed encryption key spec for the notebook + // runtime. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` // Etag: Used to perform consistent read-modify-write updates. If not set, a // blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -16137,9 +16190,6 @@ type GoogleCloudAiplatformV1NotebookRuntimeTemplate struct { // user. // "ONE_CLICK" - runtime or template with system defined configurations. NotebookRuntimeType string `json:"notebookRuntimeType,omitempty"` - // ReservationAffinity: Optional. Reservation Affinity of the notebook runtime - // template. - ReservationAffinity *GoogleCloudAiplatformV1NotebookReservationAffinity `json:"reservationAffinity,omitempty"` // ServiceAccount: The service account that the runtime workload runs as. You // can use any service account within the same project, but you must have the // service account user permission to use the instance. If not specified, the @@ -17183,7 +17233,7 @@ func (s *GoogleCloudAiplatformV1PrivateServiceConnectConfig) MarshalJSON() ([]by // against a container to determine whether it is alive or ready to receive // traffic. type GoogleCloudAiplatformV1Probe struct { - // Exec: Exec specifies the action to take. + // Exec: ExecAction probes the health of a container by executing a command. Exec *GoogleCloudAiplatformV1ProbeExecAction `json:"exec,omitempty"` // PeriodSeconds: How often (in seconds) to perform the probe. Default to 10 // seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to @@ -17983,11 +18033,71 @@ func (s *GoogleCloudAiplatformV1RawPredictRequest) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1RayMetricSpec: Configuration for the Ray metrics. +type GoogleCloudAiplatformV1RayMetricSpec struct { + // Disabled: Optional. Flag to disable the Ray metrics collection. + Disabled bool `json:"disabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Disabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Disabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RayMetricSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RayMetricSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1RaySpec: Configuration information for the Ray // cluster. For experimental launch, Ray cluster creation and Persistent // cluster creation are 1:1 mapping: We will provision all the nodes within the // Persistent cluster as Ray nodes. type GoogleCloudAiplatformV1RaySpec struct { + // HeadNodeResourcePoolId: Optional. This will be used to indicate which + // resource pool will serve as the Ray head node(the first node within that + // pool). Will use the machine from the first workerpool as the head node by + // default if this field isn't set. + HeadNodeResourcePoolId string `json:"headNodeResourcePoolId,omitempty"` + // ImageUri: Optional. Default image for user to choose a preferred ML + // framework (for example, TensorFlow or Pytorch) by choosing from Vertex + // prebuilt images + // (https://cloud.google.com/vertex-ai/docs/training/pre-built-containers). + // Either this or the resource_pool_images is required. Use this field if you + // need all the resource pools to have the same Ray image. Otherwise, use the + // {@code resource_pool_images} field. + ImageUri string `json:"imageUri,omitempty"` + // RayMetricSpec: Optional. Ray metrics configurations. + RayMetricSpec *GoogleCloudAiplatformV1RayMetricSpec `json:"rayMetricSpec,omitempty"` + // ResourcePoolImages: Optional. Required if image_uri isn't set. A map of + // resource_pool_id to prebuild Ray image if user need to use different images + // for different head/worker pools. This map needs to cover all the resource + // pool ids. Example: { "ray_head_node_pool": "head image" + // "ray_worker_node_pool1": "worker image" "ray_worker_node_pool2": "another + // worker image" } + ResourcePoolImages map[string]string `json:"resourcePoolImages,omitempty"` + // ForceSendFields is a list of field names (e.g. "HeadNodeResourcePoolId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HeadNodeResourcePoolId") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1RaySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1RaySpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1ReadFeatureValuesRequest: Request message for @@ -18519,6 +18629,26 @@ func (s *GoogleCloudAiplatformV1ResourcePoolAutoscalingSpec) MarshalJSON() ([]by // GoogleCloudAiplatformV1ResourceRuntime: Persistent Cluster runtime // information as output type GoogleCloudAiplatformV1ResourceRuntime struct { + // AccessUris: Output only. URIs for user to connect to the Cluster. Example: { + // "RAY_HEAD_NODE_INTERNAL_IP": "head-node-IP:10001" "RAY_DASHBOARD_URI": + // "ray-dashboard-address:8888" } + AccessUris map[string]string `json:"accessUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "AccessUris") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AccessUris") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1ResourceRuntime) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ResourceRuntime + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } // GoogleCloudAiplatformV1ResourceRuntimeSpec: Configuration for the runtime on @@ -22449,6 +22579,8 @@ type GoogleCloudAiplatformV1SchemaTextPromptDatasetMetadata struct { GcsUri string `json:"gcsUri,omitempty"` // GroundingConfig: Grounding checking configuration. GroundingConfig *GoogleCloudAiplatformV1SchemaPredictParamsGroundingConfig `json:"groundingConfig,omitempty"` + // HasPromptVariable: Whether the prompt dataset has prompt variable. + HasPromptVariable bool `json:"hasPromptVariable,omitempty"` // MaxOutputTokens: Value of the maximum number of tokens generated set when // the dataset was saved. MaxOutputTokens int64 `json:"maxOutputTokens,omitempty,string"` @@ -26222,6 +26354,53 @@ func (s *GoogleCloudAiplatformV1StringArray) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1StructFieldValue: One field of a Struct (or object) +// type feature value. +type GoogleCloudAiplatformV1StructFieldValue struct { + // Name: Name of the field in the struct feature. + Name string `json:"name,omitempty"` + // Value: The value for this field. + Value *GoogleCloudAiplatformV1FeatureValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1StructFieldValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1StructFieldValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1StructValue: Struct (or object) type feature value. +type GoogleCloudAiplatformV1StructValue struct { + // Values: A list of field values. + Values []*GoogleCloudAiplatformV1StructFieldValue `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Values") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Values") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1StructValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1StructValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1Study: A message representing a Study. type GoogleCloudAiplatformV1Study struct { // CreateTime: Output only. Time at which the study was created. @@ -28016,6 +28195,9 @@ type GoogleCloudAiplatformV1Tool struct { // will generate the final response back to the user. Maximum 64 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. + // Specialized retrieval tool that is powered by Google search. + GoogleSearchRetrieval *GoogleCloudAiplatformV1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` // Retrieval: Optional. Retrieval tool type. System will always execute the // provided retrieval tool(s) to get external knowledge to answer the prompt. // Retrieval results are presented to the model for generation. diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index 47a03be9933..48f80fc4625 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -4227,6 +4227,38 @@ } }, "resources": { + "chat": { + "methods": { + "completions": { + "description": "Exposes an OpenAI-compatible endpoint for chat completions.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpoints/{endpointsId}/chat/completions", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.endpoints.chat.completions", + "parameterOrder": [ + "endpoint" + ], + "parameters": { + "endpoint": { + "description": "Required. The name of the Endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/openapi`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/endpoints/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+endpoint}/chat/completions", + "request": { + "$ref": "GoogleApiHttpBody" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "cancel": { @@ -15737,6 +15769,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a reasoning engine.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reasoningEngines/{reasoningEnginesId}", + "httpMethod": "PATCH", + "id": "aiplatform.projects.locations.reasoningEngines.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Identifier. The resource name of the ReasoningEngine.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. Mask specifying which fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1ReasoningEngine" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "query": { "description": "Queries using a reasoning engine.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reasoningEngines/{reasoningEnginesId}:query", @@ -19595,7 +19661,7 @@ } } }, - "revision": "20240510", + "revision": "20240520", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionFilteredText": { @@ -19603,7 +19669,7 @@ "id": "CloudAiLargeModelsVisionFilteredText", "properties": { "category": { - "description": "Confidence level", + "description": "Filtered category", "enum": [ "RAI_CATEGORY_UNSPECIFIED", "OBSCENE", @@ -19624,6 +19690,7 @@ "SENSITIVE_WORD", "PERSON_IMG", "ICA_IMG", + "AGILE_ICA_IMG", "SEXUAL_IMG", "IU_IMG", "RACY_IMG", @@ -19640,7 +19707,8 @@ "DANGEROUS_CONTENT", "RECITATION_TEXT", "CELEBRITY_IMG", - "WATERMARK_IMG_REMOVAL" + "WATERMARK_IMG_REMOVAL", + "RAID_IMG" ], "enumDescriptions": [ "", @@ -19662,6 +19730,7 @@ "", "", "", + "Agile ICA label currently for evaluation only.", "", "", "", @@ -19678,12 +19747,13 @@ "Text category from SafetyCat v3", "", "", - "Error message when user attempts to remove watermark from editing image" + "Error message when user attempts to remove watermark from editing image", + "" ], "type": "string" }, "confidence": { - "description": "Filtered category", + "description": "Confidence score", "enum": [ "CONFIDENCE_UNSPECIFIED", "CONFIDENCE_LOW", @@ -19851,6 +19921,12 @@ "CloudAiLargeModelsVisionRaiInfo": { "id": "CloudAiLargeModelsVisionRaiInfo", "properties": { + "detectedLabels": { + "items": { + "$ref": "CloudAiLargeModelsVisionRaiInfoDetectedLabels" + }, + "type": "array" + }, "raiCategories": { "description": "List of rai categories' information to return", "items": { @@ -19869,6 +19945,32 @@ }, "type": "object" }, + "CloudAiLargeModelsVisionRaiInfoDetectedLabels": { + "description": "Filters which return labels with confidence scores.", + "id": "CloudAiLargeModelsVisionRaiInfoDetectedLabels", + "properties": { + "descriptions": { + "description": "Descriptions of the detected labels.", + "items": { + "type": "string" + }, + "type": "array" + }, + "raiCategory": { + "description": "The RAI category for the deteceted labels.", + "type": "string" + }, + "scores": { + "description": "Confidence scores mapping to the labels.", + "items": { + "format": "float", + "type": "number" + }, + "type": "array" + } + }, + "type": "object" + }, "CloudAiLargeModelsVisionSemanticFilterResponse": { "id": "CloudAiLargeModelsVisionSemanticFilterResponse", "properties": { @@ -23170,9 +23272,21 @@ "$ref": "GoogleCloudAiplatformV1beta1DedicatedResources", "description": "Required. The underlying DedicatedResources that the DeploymentResourcePool uses." }, + "disableContainerLogging": { + "description": "If the DeploymentResourcePool is deployed with custom-trained Models or AutoML Tabular Models, the container(s) of the DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.", + "type": "boolean" + }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", + "description": "Customer-managed encryption key spec for a DeploymentResourcePool. If set, this DeploymentResourcePool will be secured by this key. Endpoints and the DeploymentResourcePool they deploy in need to have the same EncryptionSpec." + }, "name": { "description": "Immutable. The resource name of the DeploymentResourcePool. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`", "type": "string" + }, + "serviceAccount": { + "description": "The service account that the DeploymentResourcePool's container(s) run as. Specify the email address of the service account. If this service account is not specified, the container(s) run as a service account that doesn't have access to the resource project. Users deploying the Models to this DeploymentResourcePool must have the `iam.serviceAccounts.actAs` permission on this service account.", + "type": "string" } }, "type": "object" @@ -23277,6 +23391,76 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1DistillationHyperParameters": { + "description": "Hyperparameters for Distillation.", + "id": "GoogleCloudAiplatformV1beta1DistillationHyperParameters", + "properties": { + "adapterSize": { + "description": "Optional. Adapter size for distillation.", + "enum": [ + "ADAPTER_SIZE_UNSPECIFIED", + "ADAPTER_SIZE_ONE", + "ADAPTER_SIZE_FOUR", + "ADAPTER_SIZE_EIGHT", + "ADAPTER_SIZE_SIXTEEN" + ], + "enumDescriptions": [ + "Adapter size is unspecified.", + "Adapter size 1.", + "Adapter size 4.", + "Adapter size 8.", + "Adapter size 16." + ], + "type": "string" + }, + "epochCount": { + "description": "Optional. Number of complete passes the model makes over the entire training dataset during training.", + "format": "int64", + "type": "string" + }, + "learningRateMultiplier": { + "description": "Optional. Multiplier for adjusting the default learning rate.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1DistillationSpec": { + "description": "Tuning Spec for Distillation.", + "id": "GoogleCloudAiplatformV1beta1DistillationSpec", + "properties": { + "baseTeacherModel": { + "description": "The base teacher model that is being distilled, e.g., \"gemini-1.0-pro-002\".", + "type": "string" + }, + "hyperParameters": { + "$ref": "GoogleCloudAiplatformV1beta1DistillationHyperParameters", + "description": "Optional. Hyperparameters for Distillation." + }, + "pipelineRootDirectory": { + "description": "Required. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.", + "type": "string" + }, + "studentModel": { + "description": "The student model that is being tuned, e.g., \"google/gemma-2b-it\".", + "type": "string" + }, + "trainingDatasetUri": { + "description": "Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.", + "type": "string" + }, + "tunedTeacherModelSource": { + "description": "The resource name of the Tuned teacher model. Format: `projects/{project}/locations/{location}/models/{model}`.", + "type": "string" + }, + "validationDatasetUri": { + "description": "Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1DoubleArray": { "description": "A list of double values.", "id": "GoogleCloudAiplatformV1beta1DoubleArray", @@ -25044,7 +25228,8 @@ "INT64_ARRAY", "STRING", "STRING_ARRAY", - "BYTES" + "BYTES", + "STRUCT" ], "enumDescriptions": [ "The value type is unspecified.", @@ -25056,7 +25241,8 @@ "Used for Feature that is a list of INT64.", "Used for Feature that is string.", "Used for Feature that is a list of String.", - "Used for Feature that is bytes." + "Used for Feature that is bytes.", + "Used for Feature that is struct." ], "type": "string" }, @@ -25417,6 +25603,10 @@ "stringValue": { "description": "String feature value.", "type": "string" + }, + "structValue": { + "$ref": "GoogleCloudAiplatformV1beta1StructValue", + "description": "A struct type feature value." } }, "type": "object" @@ -26730,22 +26920,6 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, - "responseStyle": { - "description": "Optional. Control Three levels of creativity in the model output. Default: RESPONSE_STYLE_BALANCED", - "enum": [ - "RESPONSE_STYLE_UNSPECIFIED", - "RESPONSE_STYLE_PRECISE", - "RESPONSE_STYLE_BALANCED", - "RESPONSE_STYLE_CREATIVE" - ], - "enumDescriptions": [ - "response style unspecified.", - "Precise response.", - "Default response style.", - "Creative response style." - ], - "type": "string" - }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -26848,6 +27022,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval": { + "description": "Tool to retrieve public web data for grounding, powered by Google.", + "id": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1beta1GroundednessInput": { "description": "Input for groundedness metric.", "id": "GoogleCloudAiplatformV1beta1GroundednessInput", @@ -27785,19 +27965,21 @@ "EUC_METADATA_API_STATE", "EUC_AGENT_API_STATE", "IDLE_SHUTDOWN_AGENT_STATE", - "PROXY_AGENT_STATE" + "PROXY_AGENT_STATE", + "GCR_DNS_STATE" ], "enumDescriptions": [ "Service name unknown.", "Represents the internal os docker client.", - "Represents reoslving DNS for the control plane api endpoint.", - "Represents reoslving DNS for the proxy registration endpoint.", + "Represents resolving DNS for the control plane api endpoint.", + "Represents resolving DNS for the proxy registration endpoint.", "Represents the jupyter endpoint.", "Represents the jupyter/api endpoint.", "Represents the EUC metadata server API endpoint.", "Represents the EUC agent server API endpoint.", "Represents the idle shutdown agent sidecar container.", - "Represents the proxy agent sidecar container." + "Represents the proxy agent sidecar container.", + "Represents resolving DNS for the gcr.io endpoint." ], "type": "string" }, @@ -29042,6 +29224,10 @@ "readOnly": true, "type": "string" }, + "dataplexConfig": { + "$ref": "GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig", + "description": "Optional. Dataplex integration settings." + }, "description": { "description": "Description of the MetadataStore.", "type": "string" @@ -29069,6 +29255,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig": { + "description": "Represents Dataplex integration settings.", + "id": "GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig", + "properties": { + "enabledPipelinesLineage": { + "description": "Optional. Whether or not Data Lineage synchronization is enabled for Vertex Pipelines.", + "type": "boolean" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreState": { "description": "Represents state information for a MetadataStore.", "id": "GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreState", @@ -31116,7 +31313,7 @@ "id": "GoogleCloudAiplatformV1beta1ModelMonitoringStatsDataPointTypedValueDistributionDataValue", "properties": { "distribution": { - "description": "tensorflow.metadata.v0.DatasetFeatureStatistics format.", + "description": "Predictive monitoring drift distribution in `tensorflow.metadata.v0.DatasetFeatureStatistics` format.", "type": "any" }, "distributionDeviation": { @@ -31925,10 +32122,6 @@ "readOnly": true, "type": "string" }, - "customEnvironmentSpec": { - "$ref": "GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec", - "description": "The custom compute configuration for an execution job." - }, "dataformRepositorySource": { "$ref": "GoogleCloudAiplatformV1beta1NotebookExecutionJobDataformRepositorySource", "description": "The Dataform Repository pointing to a single file notebook repository." @@ -32030,25 +32223,6 @@ }, "type": "object" }, - "GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec": { - "description": "Compute configuration to use for an execution job.", - "id": "GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec", - "properties": { - "machineSpec": { - "$ref": "GoogleCloudAiplatformV1beta1MachineSpec", - "description": "The specification of a single machine for the execution job." - }, - "networkSpec": { - "$ref": "GoogleCloudAiplatformV1beta1NetworkSpec", - "description": "The network configuration to use for the execution job." - }, - "persistentDiskSpec": { - "$ref": "GoogleCloudAiplatformV1beta1PersistentDiskSpec", - "description": "The specification of a persistent disk to attach for the execution job." - } - }, - "type": "object" - }, "GoogleCloudAiplatformV1beta1NotebookExecutionJobDataformRepositorySource": { "description": "The Dataform Repository containing the input notebook.", "id": "GoogleCloudAiplatformV1beta1NotebookExecutionJobDataformRepositorySource", @@ -32159,6 +32333,11 @@ "description": "Required. The display name of the NotebookRuntime. The name can be up to 128 characters long and can consist of any UTF-8 characters.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", + "description": "Output only. Customer-managed encryption key spec for the notebook runtime.", + "readOnly": true + }, "expirationTime": { "description": "Output only. Timestamp when this NotebookRuntime will be expired: 1. System Predefined NotebookRuntime: 24 hours after creation. After expiration, system predifined runtime will be deleted. 2. User created NotebookRuntime: 6 months after last upgrade. After expiration, user created runtime will be stopped and allowed for upgrade.", "format": "google-datetime", @@ -32180,6 +32359,11 @@ "readOnly": true, "type": "string" }, + "idleShutdownConfig": { + "$ref": "GoogleCloudAiplatformV1beta1NotebookIdleShutdownConfig", + "description": "Output only. The idle shutdown configuration of the notebook runtime.", + "readOnly": true + }, "isUpgradable": { "description": "Output only. Whether NotebookRuntime is upgradable.", "readOnly": true, @@ -32314,6 +32498,10 @@ "description": "Required. The display name of the NotebookRuntimeTemplate. The name can be up to 128 characters long and can consist of any UTF-8 characters.", "type": "string" }, + "encryptionSpec": { + "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", + "description": "Customer-managed encryption key spec for the notebook runtime." + }, "etag": { "description": "Used to perform consistent read-modify-write updates. If not set, a blind \"overwrite\" update happens.", "type": "string" @@ -33420,7 +33608,7 @@ "properties": { "exec": { "$ref": "GoogleCloudAiplatformV1beta1ProbeExecAction", - "description": "Exec specifies the action to take." + "description": "ExecAction probes the health of a container by executing a command." }, "periodSeconds": { "description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument 'periodSeconds'.", @@ -35117,6 +35305,7 @@ "type": "object" }, "notebookRuntimeTemplate": { + "deprecated": true, "description": "Output only. The resource name of NotebookRuntimeTemplate for the RoV Persistent Cluster The NotebokRuntimeTemplate is created in the same VPC (if set), and with the same Ray and Python version as the Persistent Cluster. Example: \"projects/1000/locations/us-central1/notebookRuntimeTemplates/abc123\"", "readOnly": true, "type": "string" @@ -35390,13 +35579,12 @@ "GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig": { "id": "GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig", "properties": { - "appId": { - "description": "Vertex AI Search App ID. This is used to construct the search request. By setting this app_id, API will construct the serving config which is required to call search API for the user. The app_id and serving_config_name cannot both be empty at the same time.", + "engineId": { + "description": "Optional. Vertex AI Search engine ID. This is used to construct the search request. By setting this engine_id, API will construct the serving config using the default value to call search API for the user. The engine_id and serving_config_name cannot both be empty at the same time.", "type": "string" }, "servingConfigName": { - "deprecated": true, - "description": "[Deprecated] Please use app_id instead. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`", + "description": "Optional. Vertex AI Search serving config name. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`", "type": "string" } }, @@ -40251,6 +40439,35 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1StructFieldValue": { + "description": "One field of a Struct (or object) type feature value.", + "id": "GoogleCloudAiplatformV1beta1StructFieldValue", + "properties": { + "name": { + "description": "Name of the field in the struct feature.", + "type": "string" + }, + "value": { + "$ref": "GoogleCloudAiplatformV1beta1FeatureValue", + "description": "The value for this field." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1StructValue": { + "description": "Struct (or object) type feature value.", + "id": "GoogleCloudAiplatformV1beta1StructValue", + "properties": { + "values": { + "description": "A list of field values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1StructFieldValue" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Study": { "description": "A message representing a Study.", "id": "GoogleCloudAiplatformV1beta1Study", @@ -41888,6 +42105,10 @@ }, "type": "array" }, + "googleSearchRetrieval": { + "$ref": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", + "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." + }, "retrieval": { "$ref": "GoogleCloudAiplatformV1beta1Retrieval", "description": "Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation." @@ -42536,6 +42757,10 @@ "description": "Optional. The description of the TuningJob.", "type": "string" }, + "distillationSpec": { + "$ref": "GoogleCloudAiplatformV1beta1DistillationSpec", + "description": "Tuning Spec for Distillation." + }, "encryptionSpec": { "$ref": "GoogleCloudAiplatformV1beta1EncryptionSpec", "description": "Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key." @@ -42568,6 +42793,11 @@ "readOnly": true, "type": "string" }, + "pipelineJob": { + "description": "Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`.", + "readOnly": true, + "type": "string" + }, "startTime": { "description": "Output only. Time when the TuningJob for the first time entered the `JOB_STATE_RUNNING` state.", "format": "google-datetime", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 6f1a8e3dee2..d44c363dee3 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -589,6 +589,7 @@ type ProjectsLocationsEdgeDevicesOperationsService struct { func NewProjectsLocationsEndpointsService(s *Service) *ProjectsLocationsEndpointsService { rs := &ProjectsLocationsEndpointsService{s: s} + rs.Chat = NewProjectsLocationsEndpointsChatService(s) rs.Operations = NewProjectsLocationsEndpointsOperationsService(s) return rs } @@ -596,9 +597,20 @@ func NewProjectsLocationsEndpointsService(s *Service) *ProjectsLocationsEndpoint type ProjectsLocationsEndpointsService struct { s *Service + Chat *ProjectsLocationsEndpointsChatService + Operations *ProjectsLocationsEndpointsOperationsService } +func NewProjectsLocationsEndpointsChatService(s *Service) *ProjectsLocationsEndpointsChatService { + rs := &ProjectsLocationsEndpointsChatService{s: s} + return rs +} + +type ProjectsLocationsEndpointsChatService struct { + s *Service +} + func NewProjectsLocationsEndpointsOperationsService(s *Service) *ProjectsLocationsEndpointsOperationsService { rs := &ProjectsLocationsEndpointsOperationsService{s: s} return rs @@ -1603,7 +1615,7 @@ type PublishersModelsService struct { // CloudAiLargeModelsVisionFilteredText: Details for filtered input text. type CloudAiLargeModelsVisionFilteredText struct { - // Category: Confidence level + // Category: Filtered category // // Possible values: // "RAI_CATEGORY_UNSPECIFIED" @@ -1625,6 +1637,7 @@ type CloudAiLargeModelsVisionFilteredText struct { // "SENSITIVE_WORD" // "PERSON_IMG" // "ICA_IMG" + // "AGILE_ICA_IMG" - Agile ICA label currently for evaluation only. // "SEXUAL_IMG" // "IU_IMG" // "RACY_IMG" @@ -1643,8 +1656,9 @@ type CloudAiLargeModelsVisionFilteredText struct { // "CELEBRITY_IMG" // "WATERMARK_IMG_REMOVAL" - Error message when user attempts to remove // watermark from editing image + // "RAID_IMG" Category string `json:"category,omitempty"` - // Confidence: Filtered category + // Confidence: Confidence score // // Possible values: // "CONFIDENCE_UNSPECIFIED" @@ -1866,20 +1880,21 @@ func (s *CloudAiLargeModelsVisionNamedBoundingBox) UnmarshalJSON(data []byte) er } type CloudAiLargeModelsVisionRaiInfo struct { + DetectedLabels []*CloudAiLargeModelsVisionRaiInfoDetectedLabels `json:"detectedLabels,omitempty"` // RaiCategories: List of rai categories' information to return RaiCategories []string `json:"raiCategories,omitempty"` // Scores: List of rai scores mapping to the rai categories. Rounded to 1 // decimal place. Scores []float64 `json:"scores,omitempty"` - // ForceSendFields is a list of field names (e.g. "RaiCategories") to + // ForceSendFields is a list of field names (e.g. "DetectedLabels") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RaiCategories") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DetectedLabels") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1906,6 +1921,50 @@ func (s *CloudAiLargeModelsVisionRaiInfo) UnmarshalJSON(data []byte) error { return nil } +// CloudAiLargeModelsVisionRaiInfoDetectedLabels: Filters which return labels +// with confidence scores. +type CloudAiLargeModelsVisionRaiInfoDetectedLabels struct { + // Descriptions: Descriptions of the detected labels. + Descriptions []string `json:"descriptions,omitempty"` + // RaiCategory: The RAI category for the deteceted labels. + RaiCategory string `json:"raiCategory,omitempty"` + // Scores: Confidence scores mapping to the labels. + Scores []float64 `json:"scores,omitempty"` + // ForceSendFields is a list of field names (e.g. "Descriptions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Descriptions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *CloudAiLargeModelsVisionRaiInfoDetectedLabels) MarshalJSON() ([]byte, error) { + type NoMethod CloudAiLargeModelsVisionRaiInfoDetectedLabels + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *CloudAiLargeModelsVisionRaiInfoDetectedLabels) UnmarshalJSON(data []byte) error { + type NoMethod CloudAiLargeModelsVisionRaiInfoDetectedLabels + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + type CloudAiLargeModelsVisionSemanticFilterResponse struct { // NamedBoundingBoxes: Class labels of the bounding boxes that failed the // semantic filtering. Bounding box coordinates. @@ -6891,10 +6950,29 @@ type GoogleCloudAiplatformV1beta1DeploymentResourcePool struct { // DedicatedResources: Required. The underlying DedicatedResources that the // DeploymentResourcePool uses. DedicatedResources *GoogleCloudAiplatformV1beta1DedicatedResources `json:"dedicatedResources,omitempty"` + // DisableContainerLogging: If the DeploymentResourcePool is deployed with + // custom-trained Models or AutoML Tabular Models, the container(s) of the + // DeploymentResourcePool will send `stderr` and `stdout` streams to Cloud + // Logging by default. Please note that the logs incur cost, which are subject + // to Cloud Logging pricing (https://cloud.google.com/logging/pricing). User + // can disable container logging by setting this flag to true. + DisableContainerLogging bool `json:"disableContainerLogging,omitempty"` + // EncryptionSpec: Customer-managed encryption key spec for a + // DeploymentResourcePool. If set, this DeploymentResourcePool will be secured + // by this key. Endpoints and the DeploymentResourcePool they deploy in need to + // have the same EncryptionSpec. + EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` // Name: Immutable. The resource name of the DeploymentResourcePool. Format: // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_ // resource_pool}` Name string `json:"name,omitempty"` + // ServiceAccount: The service account that the DeploymentResourcePool's + // container(s) run as. Specify the email address of the service account. If + // this service account is not specified, the container(s) run as a service + // account that doesn't have access to the resource project. Users deploying + // the Models to this DeploymentResourcePool must have the + // `iam.serviceAccounts.actAs` permission on this service account. + ServiceAccount string `json:"serviceAccount,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -7077,6 +7155,98 @@ func (s *GoogleCloudAiplatformV1beta1DiskSpec) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1DistillationHyperParameters: Hyperparameters for +// Distillation. +type GoogleCloudAiplatformV1beta1DistillationHyperParameters struct { + // AdapterSize: Optional. Adapter size for distillation. + // + // Possible values: + // "ADAPTER_SIZE_UNSPECIFIED" - Adapter size is unspecified. + // "ADAPTER_SIZE_ONE" - Adapter size 1. + // "ADAPTER_SIZE_FOUR" - Adapter size 4. + // "ADAPTER_SIZE_EIGHT" - Adapter size 8. + // "ADAPTER_SIZE_SIXTEEN" - Adapter size 16. + AdapterSize string `json:"adapterSize,omitempty"` + // EpochCount: Optional. Number of complete passes the model makes over the + // entire training dataset during training. + EpochCount int64 `json:"epochCount,omitempty,string"` + // LearningRateMultiplier: Optional. Multiplier for adjusting the default + // learning rate. + LearningRateMultiplier float64 `json:"learningRateMultiplier,omitempty"` + // ForceSendFields is a list of field names (e.g. "AdapterSize") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AdapterSize") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1DistillationHyperParameters) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DistillationHyperParameters + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1DistillationHyperParameters) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1DistillationHyperParameters + var s1 struct { + LearningRateMultiplier gensupport.JSONFloat64 `json:"learningRateMultiplier"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.LearningRateMultiplier = float64(s1.LearningRateMultiplier) + return nil +} + +// GoogleCloudAiplatformV1beta1DistillationSpec: Tuning Spec for Distillation. +type GoogleCloudAiplatformV1beta1DistillationSpec struct { + // BaseTeacherModel: The base teacher model that is being distilled, e.g., + // "gemini-1.0-pro-002". + BaseTeacherModel string `json:"baseTeacherModel,omitempty"` + // HyperParameters: Optional. Hyperparameters for Distillation. + HyperParameters *GoogleCloudAiplatformV1beta1DistillationHyperParameters `json:"hyperParameters,omitempty"` + // PipelineRootDirectory: Required. A path in a Cloud Storage bucket, which + // will be treated as the root output directory of the distillation pipeline. + // It is used by the system to generate the paths of output artifacts. + PipelineRootDirectory string `json:"pipelineRootDirectory,omitempty"` + // StudentModel: The student model that is being tuned, e.g., + // "google/gemma-2b-it". + StudentModel string `json:"studentModel,omitempty"` + // TrainingDatasetUri: Required. Cloud Storage path to file containing training + // dataset for tuning. The dataset must be formatted as a JSONL file. + TrainingDatasetUri string `json:"trainingDatasetUri,omitempty"` + // TunedTeacherModelSource: The resource name of the Tuned teacher model. + // Format: `projects/{project}/locations/{location}/models/{model}`. + TunedTeacherModelSource string `json:"tunedTeacherModelSource,omitempty"` + // ValidationDatasetUri: Optional. Cloud Storage path to file containing + // validation dataset for tuning. The dataset must be formatted as a JSONL + // file. + ValidationDatasetUri string `json:"validationDatasetUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "BaseTeacherModel") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BaseTeacherModel") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1DistillationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DistillationSpec + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1DoubleArray: A list of double values. type GoogleCloudAiplatformV1beta1DoubleArray struct { // Values: A list of double values. @@ -9507,6 +9677,7 @@ type GoogleCloudAiplatformV1beta1Feature struct { // "STRING" - Used for Feature that is string. // "STRING_ARRAY" - Used for Feature that is a list of String. // "BYTES" - Used for Feature that is bytes. + // "STRUCT" - Used for Feature that is struct. ValueType string `json:"valueType,omitempty"` // VersionColumnName: Only applicable for Vertex AI Feature Store. The name of // the BigQuery Table/View column hosting data for this version. If no value is @@ -10039,6 +10210,8 @@ type GoogleCloudAiplatformV1beta1FeatureValue struct { StringArrayValue *GoogleCloudAiplatformV1beta1StringArray `json:"stringArrayValue,omitempty"` // StringValue: String feature value. StringValue string `json:"stringValue,omitempty"` + // StructValue: A struct type feature value. + StructValue *GoogleCloudAiplatformV1beta1StructValue `json:"structValue,omitempty"` // ForceSendFields is a list of field names (e.g. "BoolArrayValue") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -12070,15 +12243,6 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` - // ResponseStyle: Optional. Control Three levels of creativity in the model - // output. Default: RESPONSE_STYLE_BALANCED - // - // Possible values: - // "RESPONSE_STYLE_UNSPECIFIED" - response style unspecified. - // "RESPONSE_STYLE_PRECISE" - Precise response. - // "RESPONSE_STYLE_BALANCED" - Default response style. - // "RESPONSE_STYLE_CREATIVE" - Creative response style. - ResponseStyle string `json:"responseStyle,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. @@ -12234,6 +12398,11 @@ func (s *GoogleCloudAiplatformV1beta1GoogleDriveSourceResourceId) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1GoogleSearchRetrieval: Tool to retrieve public +// web data for grounding, powered by Google. +type GoogleCloudAiplatformV1beta1GoogleSearchRetrieval struct { +} + // GoogleCloudAiplatformV1beta1GroundednessInput: Input for groundedness // metric. type GoogleCloudAiplatformV1beta1GroundednessInput struct { @@ -13459,9 +13628,9 @@ type GoogleCloudAiplatformV1beta1InternalOsServiceStateInstance struct { // Possible values: // "INTERNAL_OS_SERVICE_ENUM_UNSPECIFIED" - Service name unknown. // "DOCKER_SERVICE_STATE" - Represents the internal os docker client. - // "CONTROL_PLANE_API_DNS_STATE" - Represents reoslving DNS for the control + // "CONTROL_PLANE_API_DNS_STATE" - Represents resolving DNS for the control // plane api endpoint. - // "PROXY_REGISTRATION_DNS_STATE" - Represents reoslving DNS for the proxy + // "PROXY_REGISTRATION_DNS_STATE" - Represents resolving DNS for the proxy // registration endpoint. // "JUPYTER_STATE" - Represents the jupyter endpoint. // "JUPYTER_API_STATE" - Represents the jupyter/api endpoint. @@ -13471,6 +13640,7 @@ type GoogleCloudAiplatformV1beta1InternalOsServiceStateInstance struct { // "IDLE_SHUTDOWN_AGENT_STATE" - Represents the idle shutdown agent sidecar // container. // "PROXY_AGENT_STATE" - Represents the proxy agent sidecar container. + // "GCR_DNS_STATE" - Represents resolving DNS for the gcr.io endpoint. ServiceName string `json:"serviceName,omitempty"` // ServiceState: Required. internal service state. // @@ -15439,6 +15609,8 @@ func (s *GoogleCloudAiplatformV1beta1MetadataSchema) MarshalJSON() ([]byte, erro type GoogleCloudAiplatformV1beta1MetadataStore struct { // CreateTime: Output only. Timestamp when this MetadataStore was created. CreateTime string `json:"createTime,omitempty"` + // DataplexConfig: Optional. Dataplex integration settings. + DataplexConfig *GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig `json:"dataplexConfig,omitempty"` // Description: Description of the MetadataStore. Description string `json:"description,omitempty"` // EncryptionSpec: Customer-managed encryption key spec for a Metadata Store. @@ -15472,6 +15644,30 @@ func (s *GoogleCloudAiplatformV1beta1MetadataStore) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig: Represents Dataplex +// integration settings. +type GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig struct { + // EnabledPipelinesLineage: Optional. Whether or not Data Lineage + // synchronization is enabled for Vertex Pipelines. + EnabledPipelinesLineage bool `json:"enabledPipelinesLineage,omitempty"` + // ForceSendFields is a list of field names (e.g. "EnabledPipelinesLineage") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EnabledPipelinesLineage") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1MetadataStoreDataplexConfig + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreState: Represents // state information for a MetadataStore. type GoogleCloudAiplatformV1beta1MetadataStoreMetadataStoreState struct { @@ -18416,7 +18612,8 @@ func (s *GoogleCloudAiplatformV1beta1ModelMonitoringStatsDataPointTypedValue) Un // GoogleCloudAiplatformV1beta1ModelMonitoringStatsDataPointTypedValueDistributi // onDataValue: Summary statistics for a population of values. type GoogleCloudAiplatformV1beta1ModelMonitoringStatsDataPointTypedValueDistributionDataValue struct { - // Distribution: tensorflow.metadata.v0.DatasetFeatureStatistics format. + // Distribution: Predictive monitoring drift distribution in + // `tensorflow.metadata.v0.DatasetFeatureStatistics` format. Distribution interface{} `json:"distribution,omitempty"` // DistributionDeviation: Distribution distance deviation from the current // dataset's statistics to baseline dataset's statistics. * For categorical @@ -19530,9 +19727,6 @@ type GoogleCloudAiplatformV1beta1NotebookExecutionJob struct { // CreateTime: Output only. Timestamp when this NotebookExecutionJob was // created. CreateTime string `json:"createTime,omitempty"` - // CustomEnvironmentSpec: The custom compute configuration for an execution - // job. - CustomEnvironmentSpec *GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec `json:"customEnvironmentSpec,omitempty"` // DataformRepositorySource: The Dataform Repository pointing to a single file // notebook repository. DataformRepositorySource *GoogleCloudAiplatformV1beta1NotebookExecutionJobDataformRepositorySource `json:"dataformRepositorySource,omitempty"` @@ -19623,34 +19817,6 @@ func (s *GoogleCloudAiplatformV1beta1NotebookExecutionJob) MarshalJSON() ([]byte return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec: -// Compute configuration to use for an execution job. -type GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec struct { - // MachineSpec: The specification of a single machine for the execution job. - MachineSpec *GoogleCloudAiplatformV1beta1MachineSpec `json:"machineSpec,omitempty"` - // NetworkSpec: The network configuration to use for the execution job. - NetworkSpec *GoogleCloudAiplatformV1beta1NetworkSpec `json:"networkSpec,omitempty"` - // PersistentDiskSpec: The specification of a persistent disk to attach for the - // execution job. - PersistentDiskSpec *GoogleCloudAiplatformV1beta1PersistentDiskSpec `json:"persistentDiskSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "MachineSpec") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MachineSpec") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1beta1NotebookExecutionJobCustomEnvironmentSpec - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - // GoogleCloudAiplatformV1beta1NotebookExecutionJobDataformRepositorySource: // The Dataform Repository containing the input notebook. type GoogleCloudAiplatformV1beta1NotebookExecutionJobDataformRepositorySource struct { @@ -19811,6 +19977,9 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // DisplayName: Required. The display name of the NotebookRuntime. The name can // be up to 128 characters long and can consist of any UTF-8 characters. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Output only. Customer-managed encryption key spec for the + // notebook runtime. + EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` // ExpirationTime: Output only. Timestamp when this NotebookRuntime will be // expired: 1. System Predefined NotebookRuntime: 24 hours after creation. // After expiration, system predifined runtime will be deleted. 2. User created @@ -19825,6 +19994,9 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // "UNHEALTHY" - NotebookRuntime is in unhealthy state. Applies to ACTIVE // state. HealthState string `json:"healthState,omitempty"` + // IdleShutdownConfig: Output only. The idle shutdown configuration of the + // notebook runtime. + IdleShutdownConfig *GoogleCloudAiplatformV1beta1NotebookIdleShutdownConfig `json:"idleShutdownConfig,omitempty"` // IsUpgradable: Output only. Whether NotebookRuntime is upgradable. IsUpgradable bool `json:"isUpgradable,omitempty"` // Labels: The labels with user-defined metadata to organize your @@ -19932,6 +20104,9 @@ type GoogleCloudAiplatformV1beta1NotebookRuntimeTemplate struct { // name can be up to 128 characters long and can consist of any UTF-8 // characters. DisplayName string `json:"displayName,omitempty"` + // EncryptionSpec: Customer-managed encryption key spec for the notebook + // runtime. + EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` // Etag: Used to perform consistent read-modify-write updates. If not set, a // blind "overwrite" update happens. Etag string `json:"etag,omitempty"` @@ -21279,7 +21454,7 @@ func (s *GoogleCloudAiplatformV1beta1PrivateServiceConnectConfig) MarshalJSON() // performed against a container to determine whether it is alive or ready to // receive traffic. type GoogleCloudAiplatformV1beta1Probe struct { - // Exec: Exec specifies the action to take. + // Exec: ExecAction probes the health of a container by executing a command. Exec *GoogleCloudAiplatformV1beta1ProbeExecAction `json:"exec,omitempty"` // PeriodSeconds: How often (in seconds) to perform the probe. Default to 10 // seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to @@ -24232,23 +24407,22 @@ func (s *GoogleCloudAiplatformV1beta1RuntimeConfigCodeInterpreterRuntimeConfig) } type GoogleCloudAiplatformV1beta1RuntimeConfigVertexAISearchRuntimeConfig struct { - // AppId: Vertex AI Search App ID. This is used to construct the search - // request. By setting this app_id, API will construct the serving config which - // is required to call search API for the user. The app_id and - // serving_config_name cannot both be empty at the same time. - AppId string `json:"appId,omitempty"` - // ServingConfigName: [Deprecated] Please use app_id instead. Vertex AI Search - // serving config name. Format: + // EngineId: Optional. Vertex AI Search engine ID. This is used to construct + // the search request. By setting this engine_id, API will construct the + // serving config using the default value to call search API for the user. The + // engine_id and serving_config_name cannot both be empty at the same time. + EngineId string `json:"engineId,omitempty"` + // ServingConfigName: Optional. Vertex AI Search serving config name. Format: // `projects/{project}/locations/{location}/collections/{collection}/engines/{en // gine}/servingConfigs/{serving_config}` ServingConfigName string `json:"servingConfigName,omitempty"` - // ForceSendFields is a list of field names (e.g. "AppId") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // ForceSendFields is a list of field names (e.g. "EngineId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppId") to include in API + // NullFields is a list of field names (e.g. "EngineId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -32021,6 +32195,54 @@ func (s *GoogleCloudAiplatformV1beta1StringArray) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1StructFieldValue: One field of a Struct (or +// object) type feature value. +type GoogleCloudAiplatformV1beta1StructFieldValue struct { + // Name: Name of the field in the struct feature. + Name string `json:"name,omitempty"` + // Value: The value for this field. + Value *GoogleCloudAiplatformV1beta1FeatureValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1StructFieldValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1StructFieldValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1StructValue: Struct (or object) type feature +// value. +type GoogleCloudAiplatformV1beta1StructValue struct { + // Values: A list of field values. + Values []*GoogleCloudAiplatformV1beta1StructFieldValue `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Values") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Values") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudAiplatformV1beta1StructValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1StructValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Study: A message representing a Study. type GoogleCloudAiplatformV1beta1Study struct { // CreateTime: Output only. Time at which the study was created. @@ -34276,6 +34498,9 @@ type GoogleCloudAiplatformV1beta1Tool struct { // will generate the final response back to the user. Maximum 64 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. + // Specialized retrieval tool that is powered by Google search. + GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` // Retrieval: Optional. Retrieval tool type. System will always execute the // provided retrieval tool(s) to get external knowledge to answer the prompt. // Retrieval results are presented to the model for generation. @@ -35216,6 +35441,8 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { CreateTime string `json:"createTime,omitempty"` // Description: Optional. The description of the TuningJob. Description string `json:"description,omitempty"` + // DistillationSpec: Tuning Spec for Distillation. + DistillationSpec *GoogleCloudAiplatformV1beta1DistillationSpec `json:"distillationSpec,omitempty"` // EncryptionSpec: Customer-managed encryption key options for a TuningJob. If // this is set, then all resources created by the TuningJob will be encrypted // with the provided encryption key. @@ -35239,6 +35466,10 @@ type GoogleCloudAiplatformV1beta1TuningJob struct { // Name: Output only. Identifier. Resource name of a TuningJob. Format: // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` Name string `json:"name,omitempty"` + // PipelineJob: Output only. The resource name of the PipelineJob associated + // with the TuningJob. Format: + // `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. + PipelineJob string `json:"pipelineJob,omitempty"` // StartTime: Output only. Time when the TuningJob for the first time entered // the `JOB_STATE_RUNNING` state. StartTime string `json:"startTime,omitempty"` @@ -51522,6 +51753,109 @@ func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallO return ret, nil } +type ProjectsLocationsEndpointsChatCompletionsCall struct { + s *Service + endpoint string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Completions: Exposes an OpenAI-compatible endpoint for chat completions. +// +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/openapi`. +func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { + c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googleapihttpbody = googleapihttpbody + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsChatCompletionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointsChatCompletionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsChatCompletionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+endpoint}/chat/completions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.chat.completions" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleApiHttpBody{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsEndpointsOperationsCancelCall struct { s *Service name string @@ -94202,6 +94536,115 @@ func (c *ProjectsLocationsReasoningEnginesListCall) Pages(ctx context.Context, f } } +type ProjectsLocationsReasoningEnginesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a reasoning engine. +// +// - name: Identifier. The resource name of the ReasoningEngine. +func (r *ProjectsLocationsReasoningEnginesService) Patch(name string, googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine) *ProjectsLocationsReasoningEnginesPatchCall { + c := &ProjectsLocationsReasoningEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1reasoningengine = googlecloudaiplatformv1beta1reasoningengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. Mask +// specifying which fields to update. +func (c *ProjectsLocationsReasoningEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReasoningEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1reasoningengine) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.reasoningEngines.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsReasoningEnginesQueryCall struct { s *Service name string diff --git a/binaryauthorization/v1/binaryauthorization-api.json b/binaryauthorization/v1/binaryauthorization-api.json index b445932be49..0c2cd0d2078 100644 --- a/binaryauthorization/v1/binaryauthorization-api.json +++ b/binaryauthorization/v1/binaryauthorization-api.json @@ -742,7 +742,7 @@ } } }, - "revision": "20240220", + "revision": "20240524", "rootUrl": "https://binaryauthorization.googleapis.com/", "schemas": { "AdmissionRule": { @@ -1667,7 +1667,7 @@ "type": "array" }, "containerAnalysisAttestationProjects": { - "description": "Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.", + "description": "Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.", "items": { "type": "string" }, @@ -1742,7 +1742,7 @@ "type": "string" }, "noteReference": { - "description": "Required. The Grafeas resource name of a Attestation.Authority Note, created by the user, in the format: `projects/*/notes/*`. This field may not be updated. An attestation by this attestor is stored as a Grafeas Attestation.Authority Occurrence that names a container image and that links to this Note. Grafeas is an external dependency.", + "description": "Required. The Grafeas resource name of a Attestation.Authority Note, created by the user, in the format: `projects/[PROJECT_ID]/notes/*`. This field may not be updated. A project ID must be used, not a project number. An attestation by this attestor is stored as a Grafeas Attestation.Authority Occurrence that names a container image and that links to this Note. Grafeas is an external dependency.", "type": "string" }, "publicKeys": { diff --git a/binaryauthorization/v1/binaryauthorization-gen.go b/binaryauthorization/v1/binaryauthorization-gen.go index 43f84fefcfa..93d5f9d99a2 100644 --- a/binaryauthorization/v1/binaryauthorization-gen.go +++ b/binaryauthorization/v1/binaryauthorization-gen.go @@ -1740,11 +1740,11 @@ type SimpleSigningAttestationCheck struct { // `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify // an image for this check to pass, so a single verified attestation found in // any of `container_analysis_attestation_projects` is sufficient for the check - // to pass. When fetching Occurrences from Container Analysis, only - // `AttestationOccurrence` kinds are considered. In the future, additional - // Occurrence kinds may be added to the query. Maximum number of - // `container_analysis_attestation_projects` allowed in each - // `SimpleSigningAttestationCheck` is 10. + // to pass. A project ID must be used, not a project number. When fetching + // Occurrences from Container Analysis, only `AttestationOccurrence` kinds are + // considered. In the future, additional Occurrence kinds may be added to the + // query. Maximum number of `container_analysis_attestation_projects` allowed + // in each `SimpleSigningAttestationCheck` is 10. ContainerAnalysisAttestationProjects []string `json:"containerAnalysisAttestationProjects,omitempty"` // ForceSendFields is a list of field names (e.g. "AttestationAuthenticators") // to unconditionally include in API requests. By default, fields with empty or @@ -1896,10 +1896,10 @@ type UserOwnedGrafeasNote struct { DelegationServiceAccountEmail string `json:"delegationServiceAccountEmail,omitempty"` // NoteReference: Required. The Grafeas resource name of a // Attestation.Authority Note, created by the user, in the format: - // `projects/*/notes/*`. This field may not be updated. An attestation by this - // attestor is stored as a Grafeas Attestation.Authority Occurrence that names - // a container image and that links to this Note. Grafeas is an external - // dependency. + // `projects/[PROJECT_ID]/notes/*`. This field may not be updated. A project ID + // must be used, not a project number. An attestation by this attestor is + // stored as a Grafeas Attestation.Authority Occurrence that names a container + // image and that links to this Note. Grafeas is an external dependency. NoteReference string `json:"noteReference,omitempty"` // PublicKeys: Optional. Public keys that verify attestations signed by this // attestor. This field may be updated. If this field is non-empty, one of the diff --git a/cloudfunctions/v1/cloudfunctions-api.json b/cloudfunctions/v1/cloudfunctions-api.json index 0e1abb8408c..773024a1318 100644 --- a/cloudfunctions/v1/cloudfunctions-api.json +++ b/cloudfunctions/v1/cloudfunctions-api.json @@ -552,7 +552,7 @@ } } }, - "revision": "20240418", + "revision": "20240523", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AuditConfig": { @@ -1716,7 +1716,7 @@ "id": "OnDeployUpdatePolicy", "properties": { "runtimeVersion": { - "description": "Output only. contains the runtime version which was used during latest function deployment.", + "description": "Output only. Contains the runtime version which was used during latest function deployment.", "readOnly": true, "type": "string" } diff --git a/cloudfunctions/v1/cloudfunctions-gen.go b/cloudfunctions/v1/cloudfunctions-gen.go index 54dbc8fe62d..19fad779aea 100644 --- a/cloudfunctions/v1/cloudfunctions-gen.go +++ b/cloudfunctions/v1/cloudfunctions-gen.go @@ -1531,7 +1531,7 @@ func (s *Location) MarshalJSON() ([]byte, error) { // OnDeployUpdatePolicy: Security patches are only applied when a function is // redeployed. type OnDeployUpdatePolicy struct { - // RuntimeVersion: Output only. contains the runtime version which was used + // RuntimeVersion: Output only. Contains the runtime version which was used // during latest function deployment. RuntimeVersion string `json:"runtimeVersion,omitempty"` // ForceSendFields is a list of field names (e.g. "RuntimeVersion") to diff --git a/cloudfunctions/v2/cloudfunctions-api.json b/cloudfunctions/v2/cloudfunctions-api.json index 8284face8fa..4ca9e7e1e14 100644 --- a/cloudfunctions/v2/cloudfunctions-api.json +++ b/cloudfunctions/v2/cloudfunctions-api.json @@ -716,7 +716,7 @@ } } }, - "revision": "20240307", + "revision": "20240523", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -2201,6 +2201,10 @@ "description": "The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.", "type": "string" }, + "binaryAuthorizationPolicy": { + "description": "Optional. The binary authorization policy to be checked when deploying the Cloud Run service.", + "type": "string" + }, "environmentVariables": { "additionalProperties": { "type": "string" @@ -2415,6 +2419,10 @@ "object": { "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", "type": "string" + }, + "sourceUploadUrl": { + "description": "When the specified storage bucket is a 1st gen function uploard url bucket, this field should be set as the generated upload url for 1st gen deployment.", + "type": "string" } }, "type": "object" diff --git a/cloudfunctions/v2/cloudfunctions-gen.go b/cloudfunctions/v2/cloudfunctions-gen.go index 6efc7616a63..90b50b0df80 100644 --- a/cloudfunctions/v2/cloudfunctions-gen.go +++ b/cloudfunctions/v2/cloudfunctions-gen.go @@ -1930,6 +1930,9 @@ type ServiceConfig struct { // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go // a full description. AvailableMemory string `json:"availableMemory,omitempty"` + // BinaryAuthorizationPolicy: Optional. The binary authorization policy to be + // checked when deploying the Cloud Run service. + BinaryAuthorizationPolicy string `json:"binaryAuthorizationPolicy,omitempty"` // EnvironmentVariables: Environment variables that shall be available during // function execution. EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` @@ -2168,6 +2171,10 @@ type StorageSource struct { // Object: Google Cloud Storage object containing the source. This object must // be a gzipped archive file (`.tar.gz`) containing source to build. Object string `json:"object,omitempty"` + // SourceUploadUrl: When the specified storage bucket is a 1st gen function + // uploard url bucket, this field should be set as the generated upload url for + // 1st gen deployment. + SourceUploadUrl string `json:"sourceUploadUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/cloudfunctions/v2alpha/cloudfunctions-api.json b/cloudfunctions/v2alpha/cloudfunctions-api.json index 425a2ff9599..2b4c9f458c6 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-api.json +++ b/cloudfunctions/v2alpha/cloudfunctions-api.json @@ -716,7 +716,7 @@ } } }, - "revision": "20240307", + "revision": "20240523", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -2201,6 +2201,10 @@ "description": "The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.", "type": "string" }, + "binaryAuthorizationPolicy": { + "description": "Optional. The binary authorization policy to be checked when deploying the Cloud Run service.", + "type": "string" + }, "environmentVariables": { "additionalProperties": { "type": "string" @@ -2415,6 +2419,10 @@ "object": { "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", "type": "string" + }, + "sourceUploadUrl": { + "description": "When the specified storage bucket is a 1st gen function uploard url bucket, this field should be set as the generated upload url for 1st gen deployment.", + "type": "string" } }, "type": "object" diff --git a/cloudfunctions/v2alpha/cloudfunctions-gen.go b/cloudfunctions/v2alpha/cloudfunctions-gen.go index e31b16864f1..d05d01d4ffc 100644 --- a/cloudfunctions/v2alpha/cloudfunctions-gen.go +++ b/cloudfunctions/v2alpha/cloudfunctions-gen.go @@ -1930,6 +1930,9 @@ type ServiceConfig struct { // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go // a full description. AvailableMemory string `json:"availableMemory,omitempty"` + // BinaryAuthorizationPolicy: Optional. The binary authorization policy to be + // checked when deploying the Cloud Run service. + BinaryAuthorizationPolicy string `json:"binaryAuthorizationPolicy,omitempty"` // EnvironmentVariables: Environment variables that shall be available during // function execution. EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` @@ -2168,6 +2171,10 @@ type StorageSource struct { // Object: Google Cloud Storage object containing the source. This object must // be a gzipped archive file (`.tar.gz`) containing source to build. Object string `json:"object,omitempty"` + // SourceUploadUrl: When the specified storage bucket is a 1st gen function + // uploard url bucket, this field should be set as the generated upload url for + // 1st gen deployment. + SourceUploadUrl string `json:"sourceUploadUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/cloudfunctions/v2beta/cloudfunctions-api.json b/cloudfunctions/v2beta/cloudfunctions-api.json index f9b988bc6b0..f8bbd7a3bcf 100644 --- a/cloudfunctions/v2beta/cloudfunctions-api.json +++ b/cloudfunctions/v2beta/cloudfunctions-api.json @@ -716,7 +716,7 @@ } } }, - "revision": "20240307", + "revision": "20240523", "rootUrl": "https://cloudfunctions.googleapis.com/", "schemas": { "AbortFunctionUpgradeRequest": { @@ -2201,6 +2201,10 @@ "description": "The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.", "type": "string" }, + "binaryAuthorizationPolicy": { + "description": "Optional. The binary authorization policy to be checked when deploying the Cloud Run service.", + "type": "string" + }, "environmentVariables": { "additionalProperties": { "type": "string" @@ -2415,6 +2419,10 @@ "object": { "description": "Google Cloud Storage object containing the source. This object must be a gzipped archive file (`.tar.gz`) containing source to build.", "type": "string" + }, + "sourceUploadUrl": { + "description": "When the specified storage bucket is a 1st gen function uploard url bucket, this field should be set as the generated upload url for 1st gen deployment.", + "type": "string" } }, "type": "object" diff --git a/cloudfunctions/v2beta/cloudfunctions-gen.go b/cloudfunctions/v2beta/cloudfunctions-gen.go index 87e5bcd3c34..451ca27df6f 100644 --- a/cloudfunctions/v2beta/cloudfunctions-gen.go +++ b/cloudfunctions/v2beta/cloudfunctions-gen.go @@ -1930,6 +1930,9 @@ type ServiceConfig struct { // https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go // a full description. AvailableMemory string `json:"availableMemory,omitempty"` + // BinaryAuthorizationPolicy: Optional. The binary authorization policy to be + // checked when deploying the Cloud Run service. + BinaryAuthorizationPolicy string `json:"binaryAuthorizationPolicy,omitempty"` // EnvironmentVariables: Environment variables that shall be available during // function execution. EnvironmentVariables map[string]string `json:"environmentVariables,omitempty"` @@ -2168,6 +2171,10 @@ type StorageSource struct { // Object: Google Cloud Storage object containing the source. This object must // be a gzipped archive file (`.tar.gz`) containing source to build. Object string `json:"object,omitempty"` + // SourceUploadUrl: When the specified storage bucket is a 1st gen function + // uploard url bucket, this field should be set as the generated upload url for + // 1st gen deployment. + SourceUploadUrl string `json:"sourceUploadUrl,omitempty"` // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/datastream/v1/datastream-api.json b/datastream/v1/datastream-api.json index 8f1cc8d7fa8..c935afd6c3d 100644 --- a/datastream/v1/datastream-api.json +++ b/datastream/v1/datastream-api.json @@ -1250,7 +1250,7 @@ } } }, - "revision": "20240410", + "revision": "20240515", "rootUrl": "https://datastream.googleapis.com/", "schemas": { "AppendOnly": { @@ -2861,6 +2861,12 @@ }, "type": "object" }, + "SqlServerChangeTables": { + "description": "Configuration to use Change Tables CDC read method.", + "id": "SqlServerChangeTables", + "properties": {}, + "type": "object" + }, "SqlServerColumn": { "description": "SQLServer Column.", "id": "SqlServerColumn", @@ -2983,6 +2989,10 @@ "description": "SQLServer data source configuration", "id": "SqlServerSourceConfig", "properties": { + "changeTables": { + "$ref": "SqlServerChangeTables", + "description": "CDC reader reads from change tables." + }, "excludeObjects": { "$ref": "SqlServerRdbms", "description": "SQLServer objects to exclude from the stream." @@ -3000,6 +3010,10 @@ "description": "Max concurrent CDC tasks.", "format": "int32", "type": "integer" + }, + "transactionLogs": { + "$ref": "SqlServerTransactionLogs", + "description": "CDC reader reads from transaction logs." } }, "type": "object" @@ -3022,6 +3036,12 @@ }, "type": "object" }, + "SqlServerTransactionLogs": { + "description": "Configuration to use Transaction Logs CDC read method.", + "id": "SqlServerTransactionLogs", + "properties": {}, + "type": "object" + }, "StartBackfillJobRequest": { "description": "Request for manually initiating a backfill job for a specific stream object.", "id": "StartBackfillJobRequest", diff --git a/datastream/v1/datastream-gen.go b/datastream/v1/datastream-gen.go index 273a94d12e6..41b4a96cd22 100644 --- a/datastream/v1/datastream-gen.go +++ b/datastream/v1/datastream-gen.go @@ -2136,6 +2136,10 @@ func (s *SpecificStartPosition) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SqlServerChangeTables: Configuration to use Change Tables CDC read method. +type SqlServerChangeTables struct { +} + // SqlServerColumn: SQLServer Column. type SqlServerColumn struct { // Column: Column name. @@ -2274,6 +2278,8 @@ func (s *SqlServerSchema) MarshalJSON() ([]byte, error) { // SqlServerSourceConfig: SQLServer data source configuration type SqlServerSourceConfig struct { + // ChangeTables: CDC reader reads from change tables. + ChangeTables *SqlServerChangeTables `json:"changeTables,omitempty"` // ExcludeObjects: SQLServer objects to exclude from the stream. ExcludeObjects *SqlServerRdbms `json:"excludeObjects,omitempty"` // IncludeObjects: SQLServer objects to include in the stream. @@ -2282,15 +2288,17 @@ type SqlServerSourceConfig struct { MaxConcurrentBackfillTasks int64 `json:"maxConcurrentBackfillTasks,omitempty"` // MaxConcurrentCdcTasks: Max concurrent CDC tasks. MaxConcurrentCdcTasks int64 `json:"maxConcurrentCdcTasks,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExcludeObjects") to + // TransactionLogs: CDC reader reads from transaction logs. + TransactionLogs *SqlServerTransactionLogs `json:"transactionLogs,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChangeTables") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExcludeObjects") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ChangeTables") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -2325,6 +2333,11 @@ func (s *SqlServerTable) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SqlServerTransactionLogs: Configuration to use Transaction Logs CDC read +// method. +type SqlServerTransactionLogs struct { +} + // StartBackfillJobRequest: Request for manually initiating a backfill job for // a specific stream object. type StartBackfillJobRequest struct { diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 9bb47ec64c1..acb34452f1a 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -106,6 +106,36 @@ "protocol": "rest", "resources": { "projects": { + "methods": { + "provision": { + "description": "Provisions the project resource. During the process, related systems will get prepared and initialized. Caller must read the [Terms for data use](https://cloud.google.com/retail/data-use-terms), and optionally specify in request to provide consent to that service terms.", + "flatPath": "v1/projects/{projectsId}:provision", + "httpMethod": "POST", + "id": "discoveryengine.projects.provision", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of a Project, such as `projects/{project_id_or_number}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:provision", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ProvisionProjectRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "locations": { "resources": { @@ -355,7 +385,7 @@ ], "parameters": { "filter": { - "description": "Filter by solution type . For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "description": "Filter by solution type . For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`", "location": "query", "type": "string" }, @@ -742,6 +772,168 @@ } } }, + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "conversations": { "methods": { "converse": { @@ -2201,6 +2393,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/userEvents:write", @@ -2380,6 +2577,168 @@ } }, "resources": { + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.engines.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "conversations": { "methods": { "converse": { @@ -3165,7 +3524,7 @@ ], "parameters": { "filter": { - "description": "Filter by solution type . For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "description": "Filter by solution type . For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`", "location": "query", "type": "string" }, @@ -3482,73 +3841,235 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1/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": "v1/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/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": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/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": "v1/{+name}/operations", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/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": "v1/{+name}/operations", - "response": { - "$ref": "GoogleLongrunningListOperationsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" } - } + }, + "path": "v1/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -4733,6 +5254,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/userEvents:write", @@ -4901,6 +5427,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1/{+parent}/userEvents:write", @@ -5019,7 +5550,7 @@ } } }, - "revision": "20240517", + "revision": "20240526", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5354,6 +5885,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", + "type": "boolean" + }, "ignoreNonAnswerSeekingQuery": { "description": "Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", "type": "boolean" @@ -5490,6 +6025,13 @@ "$ref": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpec", "description": "Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec" + }, + "type": "array" + }, "filter": { "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" @@ -5744,6 +6286,14 @@ "description": "Page identifier.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -5770,6 +6320,14 @@ "description": "Document resource name.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -6357,6 +6915,200 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Condition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1Condition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Control": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1Control", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Condition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1Conversation": { "description": "External conversation proto definition.", "id": "GoogleCloudDiscoveryengineV1Conversation", @@ -7132,7 +7884,7 @@ "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -7632,6 +8384,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ListControlsResponse": { + "description": "Response for ListControls method.", + "id": "GoogleCloudDiscoveryengineV1ListControlsResponse", + "properties": { + "controls": { + "description": "All the Controls for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Control" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1ListConversationsResponse": { "description": "Response for ListConversations method.", "id": "GoogleCloudDiscoveryengineV1ListConversationsResponse", @@ -7828,6 +8598,100 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Project": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1Project", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProvisionProjectRequest": { + "description": "Request for ProjectService.ProvisionProject method.", + "id": "GoogleCloudDiscoveryengineV1ProvisionProjectRequest", + "properties": { + "acceptDataUseTerms": { + "description": "Required. Set to `true` to specify that caller has read and would like to give consent to the [Terms for data use](https://cloud.google.com/retail/data-use-terms).", + "type": "boolean" + }, + "dataUseTermsVersion": { + "description": "Required. The version of the [Terms for data use](https://cloud.google.com/retail/data-use-terms) that caller has read and would like to give consent to. Acceptable version is `2022-11-23`, and this may change over time.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", @@ -7978,6 +8842,13 @@ "description": "The number of results to return. If this is unset or no bigger than zero, returns all results.", "format": "int32", "type": "integer" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" } }, "type": "object" @@ -9241,6 +10112,10 @@ "$ref": "GoogleCloudDiscoveryengineV1CompletionInfo", "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "dataStore": { + "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", + "type": "string" + }, "directUserRequest": { "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", "type": "boolean" @@ -9252,6 +10127,10 @@ }, "type": "array" }, + "engine": { + "description": "The Engine resource name, in the form of `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. Optional. Only required for Engine produced user events. For example, user events from blended search.", + "type": "string" + }, "eventTime": { "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", "format": "google-datetime", @@ -9565,6 +10444,14 @@ "description": "Page identifier.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -9591,6 +10478,14 @@ "description": "Document resource name.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -9728,65 +10623,259 @@ "description": "Chunk textual content.", "type": "string" }, - "relevanceScore": { - "description": "Relevance score.", - "format": "float", - "type": "number" + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { + "description": "Snippet information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", + "properties": { + "snippet": { + "description": "Snippet content.", + "type": "string" + }, + "snippetStatus": { + "description": "Status of the snippet defined by the search team.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { + "description": "Search action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "properties": { + "query": { + "description": "The query to search.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", + "properties": { + "targetSites": { + "description": "TargetSites created.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1alphaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1alphaControl", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { - "description": "Snippet information.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", + "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", "properties": { - "snippet": { - "description": "Snippet content.", + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", "type": "string" }, - "snippetStatus": { - "description": "Status of the snippet defined by the search team.", + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { - "description": "Search action.", - "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", "properties": { - "query": { - "description": "The query to search.", + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", + "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", "properties": { - "targetSites": { - "description": "TargetSites created.", + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + "type": "string" }, "type": "array" } @@ -9885,7 +10974,7 @@ "TRAINING_FAILED" ], "enumDescriptions": [ - "", + "Default value.", "The model is in a paused training state.", "The model is currently training.", "The model has successfully completed training.", @@ -9895,6 +10984,7 @@ "type": "string" }, "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, @@ -10375,7 +11465,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -10561,12 +11651,14 @@ "enum": [ "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", "METATAGS", - "PAGEMAP" + "PAGEMAP", + "SCHEMA_ORG" ], "enumDescriptions": [ "Value used when unset.", "Retrieve value from meta tag.", - "Retrieve value from page map." + "Retrieve value from page map.", + "Retrieve value from schema.org data." ], "type": "string" }, @@ -10676,6 +11768,13 @@ ], "type": "string" }, + "schemaOrgPaths": { + "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", + "items": { + "type": "string" + }, + "type": "array" + }, "searchableOption": { "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", "enum": [ @@ -11583,6 +12682,200 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1betaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1betaControl", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", @@ -11675,7 +12968,7 @@ "TRAINING_FAILED" ], "enumDescriptions": [ - "", + "Default value.", "The model is in a paused training state.", "The model is currently training.", "The model has successfully completed training.", @@ -11685,6 +12978,7 @@ "type": "string" }, "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, @@ -12102,7 +13396,7 @@ "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -12315,6 +13609,85 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1betaProject", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 32cd114e5c3..2f1cf96a70f 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -241,6 +241,7 @@ type ProjectsLocationsCollectionsDataConnectorOperationsService struct { func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocationsCollectionsDataStoresService { rs := &ProjectsLocationsCollectionsDataStoresService{s: s} rs.Branches = NewProjectsLocationsCollectionsDataStoresBranchesService(s) + rs.Controls = NewProjectsLocationsCollectionsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsDataStoresConversationsService(s) rs.Models = NewProjectsLocationsCollectionsDataStoresModelsService(s) rs.Operations = NewProjectsLocationsCollectionsDataStoresOperationsService(s) @@ -258,6 +259,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { Branches *ProjectsLocationsCollectionsDataStoresBranchesService + Controls *ProjectsLocationsCollectionsDataStoresControlsService + Conversations *ProjectsLocationsCollectionsDataStoresConversationsService Models *ProjectsLocationsCollectionsDataStoresModelsService @@ -310,6 +313,15 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresControlsService(s *Service) *ProjectsLocationsCollectionsDataStoresControlsService { + rs := &ProjectsLocationsCollectionsDataStoresControlsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresControlsService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresConversationsService(s *Service) *ProjectsLocationsCollectionsDataStoresConversationsService { rs := &ProjectsLocationsCollectionsDataStoresConversationsService{s: s} return rs @@ -465,6 +477,7 @@ type ProjectsLocationsCollectionsDataStoresUserEventsService struct { func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocationsCollectionsEnginesService { rs := &ProjectsLocationsCollectionsEnginesService{s: s} + rs.Controls = NewProjectsLocationsCollectionsEnginesControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsEnginesConversationsService(s) rs.Operations = NewProjectsLocationsCollectionsEnginesOperationsService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsEnginesServingConfigsService(s) @@ -475,6 +488,8 @@ func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocation type ProjectsLocationsCollectionsEnginesService struct { s *Service + Controls *ProjectsLocationsCollectionsEnginesControlsService + Conversations *ProjectsLocationsCollectionsEnginesConversationsService Operations *ProjectsLocationsCollectionsEnginesOperationsService @@ -484,6 +499,15 @@ type ProjectsLocationsCollectionsEnginesService struct { Sessions *ProjectsLocationsCollectionsEnginesSessionsService } +func NewProjectsLocationsCollectionsEnginesControlsService(s *Service) *ProjectsLocationsCollectionsEnginesControlsService { + rs := &ProjectsLocationsCollectionsEnginesControlsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsEnginesControlsService struct { + s *Service +} + func NewProjectsLocationsCollectionsEnginesConversationsService(s *Service) *ProjectsLocationsCollectionsEnginesConversationsService { rs := &ProjectsLocationsCollectionsEnginesConversationsService{s: s} return rs @@ -544,6 +568,7 @@ type ProjectsLocationsCollectionsOperationsService struct { func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataStoresService { rs := &ProjectsLocationsDataStoresService{s: s} rs.Branches = NewProjectsLocationsDataStoresBranchesService(s) + rs.Controls = NewProjectsLocationsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsDataStoresConversationsService(s) rs.Models = NewProjectsLocationsDataStoresModelsService(s) rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) @@ -561,6 +586,8 @@ type ProjectsLocationsDataStoresService struct { Branches *ProjectsLocationsDataStoresBranchesService + Controls *ProjectsLocationsDataStoresControlsService + Conversations *ProjectsLocationsDataStoresConversationsService Models *ProjectsLocationsDataStoresModelsService @@ -613,6 +640,15 @@ type ProjectsLocationsDataStoresBranchesOperationsService struct { s *Service } +func NewProjectsLocationsDataStoresControlsService(s *Service) *ProjectsLocationsDataStoresControlsService { + rs := &ProjectsLocationsDataStoresControlsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresControlsService struct { + s *Service +} + func NewProjectsLocationsDataStoresConversationsService(s *Service) *ProjectsLocationsDataStoresConversationsService { rs := &ProjectsLocationsDataStoresConversationsService{s: s} return rs @@ -1186,6 +1222,11 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestAnswerGenerationSpec struct { // skip generating answers for adversarial queries and return fallback messages // instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. If this field is set to `false`, all search results are used + // regardless of relevance to generate answers. If set to `true` or unset, the + // behavior will be determined automatically by the service. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,omitempty"` // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries that // are not answer-seeking. The default value is `false`. Google employs // search-query classification to detect answer-seeking queries. No answer is @@ -1421,6 +1462,11 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestSearchSpecSearchParams struct // which may affect the answer query response. For more information on // boosting, see Boosting (https://cloud.google.com/retail/docs/boosting#boost) BoostSpec *GoogleCloudDiscoveryengineV1SearchRequestBoostSpec `json:"boostSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. Filter expression is case-sensitive. This will be used to filter @@ -1804,6 +1850,9 @@ type GoogleCloudDiscoveryengineV1AnswerReferenceChunkInfoDocumentMetadata struct Document string `json:"document,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -1833,6 +1882,9 @@ type GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfo struct ChunkContents []*GoogleCloudDiscoveryengineV1AnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` // Document: Document resource name. Document string `json:"document,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -2683,6 +2735,289 @@ func (s *GoogleCloudDiscoveryengineV1CompletionInfo) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Condition: Defines circumstances to be checked +// before allowing a behavior +type GoogleCloudDiscoveryengineV1Condition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1ConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1ConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Condition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Condition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ConditionQueryTerm: Matcher for search request +// query +type GoogleCloudDiscoveryengineV1ConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ConditionQueryTerm + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1ConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1Control: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1Control struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1ControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1Condition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1ControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1ControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1ControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Control) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Control + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlBoostAction: Adjusts order of products in +// returned list. +type GoogleCloudDiscoveryengineV1ControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1ControlFilterAction: Specified which products +// may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1ControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlRedirectAction: Redirects a shopper to +// the provided URI. +type GoogleCloudDiscoveryengineV1ControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlSynonymsAction: Creates a set of terms +// that will act as synonyms of one another. Example: "happy" will also be +// considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1ControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1Conversation: External conversation proto // definition. type GoogleCloudDiscoveryengineV1Conversation struct { @@ -3748,9 +4083,8 @@ func (s *GoogleCloudDiscoveryengineV1EngineChatEngineMetadata) MarshalJSON() ([] // GoogleCloudDiscoveryengineV1EngineCommonConfig: Common configurations for an // Engine. type GoogleCloudDiscoveryengineV1EngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -4475,6 +4809,34 @@ func (s *GoogleCloudDiscoveryengineV1Interval) UnmarshalJSON(data []byte) error return nil } +// GoogleCloudDiscoveryengineV1ListControlsResponse: Response for ListControls +// method. +type GoogleCloudDiscoveryengineV1ListControlsResponse struct { + // Controls: All the Controls for a given data store. + Controls []*GoogleCloudDiscoveryengineV1Control `json:"controls,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Controls") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Controls") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ListControlsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ListControlsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1ListConversationsResponse: Response for // ListConversations method. type GoogleCloudDiscoveryengineV1ListConversationsResponse struct { @@ -4803,21 +5165,23 @@ func (s *GoogleCloudDiscoveryengineV1PanelInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata: Metadata related to the -// progress of the PurgeDocuments operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1Project: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1Project struct { + // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // IgnoredCount: Count of entries that were ignored as entries were not found. - IgnoredCount int64 `json:"ignoredCount,omitempty,string"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1ProjectServiceTerms `json:"serviceTermsMap,omitempty"` // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -4831,32 +5195,146 @@ type GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1Project) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Project return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1PurgeDocumentsRequest: Request message for -// DocumentService.PurgeDocuments method. -type GoogleCloudDiscoveryengineV1PurgeDocumentsRequest struct { - // Filter: Required. Filter matching documents to purge. Only currently - // supported value is `*` (all items). - Filter string `json:"filter,omitempty"` - // Force: Actually performs the purge. If `force` is set to false, return the - // expected purge count without deleting any documents. - Force bool `json:"force,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} +// GoogleCloudDiscoveryengineV1ProjectServiceTerms: Metadata about the terms of +// service. +type GoogleCloudDiscoveryengineV1ProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ProvisionProjectMetadata: Metadata associated +// with a project provision operation. +type GoogleCloudDiscoveryengineV1ProvisionProjectMetadata struct { +} + +// GoogleCloudDiscoveryengineV1ProvisionProjectRequest: Request for +// ProjectService.ProvisionProject method. +type GoogleCloudDiscoveryengineV1ProvisionProjectRequest struct { + // AcceptDataUseTerms: Required. Set to `true` to specify that caller has read + // and would like to give consent to the Terms for data use + // (https://cloud.google.com/retail/data-use-terms). + AcceptDataUseTerms bool `json:"acceptDataUseTerms,omitempty"` + // DataUseTermsVersion: Required. The version of the Terms for data use + // (https://cloud.google.com/retail/data-use-terms) that caller has read and + // would like to give consent to. Acceptable version is `2022-11-23`, and this + // may change over time. + DataUseTermsVersion string `json:"dataUseTermsVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptDataUseTerms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptDataUseTerms") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ProvisionProjectRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ProvisionProjectRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata: Metadata related to the +// progress of the PurgeDocuments operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1PurgeDocumentsRequest: Request message for +// DocumentService.PurgeDocuments method. +type GoogleCloudDiscoveryengineV1PurgeDocumentsRequest struct { + // Filter: Required. Filter matching documents to purge. Only currently + // supported value is `*` (all items). + Filter string `json:"filter,omitempty"` + // Force: Actually performs the purge. If `force` is set to false, return the + // expected purge count without deleting any documents. + Force bool `json:"force,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} func (s *GoogleCloudDiscoveryengineV1PurgeDocumentsRequest) MarshalJSON() ([]byte, error) { type NoMethod GoogleCloudDiscoveryengineV1PurgeDocumentsRequest @@ -4993,6 +5471,19 @@ type GoogleCloudDiscoveryengineV1RankRequest struct { // TopN: The number of results to return. If this is unset or no bigger than // zero, returns all results. TopN int64 `json:"topN,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. // "IgnoreRecordDetailsInResponse") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -6972,6 +7463,13 @@ type GoogleCloudDiscoveryengineV1UserEvent struct { // event. This field should be set for `search` event when autocomplete // function is enabled and the user clicks a suggestion for search. CompletionInfo *GoogleCloudDiscoveryengineV1CompletionInfo `json:"completionInfo,omitempty"` + // DataStore: The DataStore resource full name, of the form + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. Optional. Only required for user events whose data + // store can't by determined by UserEvent.engine or UserEvent.documents. If + // data store is set in the parent of write/import/collect user event requests, + // this field can be omitted. + DataStore string `json:"dataStore,omitempty"` // DirectUserRequest: Should set to true if the request is made directly from // the end user, in which case the UserEvent.user_info.user_agent can be // populated from the HTTP request. This flag should be set only if the API @@ -6989,6 +7487,11 @@ type GoogleCloudDiscoveryengineV1UserEvent struct { // for the same query, a new `search` event with different UserEvent.documents // is desired. Documents []*GoogleCloudDiscoveryengineV1DocumentInfo `json:"documents,omitempty"` + // Engine: The Engine resource name, in the form of + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}`. Optional. Only required for Engine produced user events. For + // example, user events from blended search. + Engine string `json:"engine,omitempty"` // EventTime: Only required for UserEventService.ImportUserEvents method. // Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` @@ -7376,6 +7879,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata s Document string `json:"document,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -7405,6 +7911,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo st ChunkContents []*GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` // Document: Document resource name. Document string `json:"document,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -7704,161 +8213,442 @@ func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) Marsha return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata: Metadata related -// to the progress of the DataStoreService.CreateDataStore operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1alphaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1alphaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1alphaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1alphaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1alphaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCondition return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata: Metadata related to -// the progress of the EngineService.CreateEngine operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1alphaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1alphaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API + // NullFields is a list of field names (e.g. "FullMatch") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConditionQueryTerm return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for Create -// Schema LRO. -type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1alphaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API + // NullFields is a list of field names (e.g. "EndTime") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConditionTimeRange return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata: Metadata related -// to the progress of the SiteSearchEngineService.CreateTargetSite operation. -// This will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or +// GoogleCloudDiscoveryengineV1alphaControl: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1alphaControl struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1alphaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1alphaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1alphaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1alphaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1alphaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControl return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCustomTuningModel: Metadata that describes -// a custom tuned model. -type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { - // CreateTime: Timestamp the Model was created at. - CreateTime string `json:"createTime,omitempty"` - // DisplayName: The display name of the model. - DisplayName string `json:"displayName,omitempty"` - // ModelState: The state that the model is in (e.g.`TRAINING` or - // `TRAINING_FAILED`). - // - // Possible values: - // "MODEL_STATE_UNSPECIFIED" - // "TRAINING_PAUSED" - The model is in a paused training state. - // "TRAINING" - The model is currently training. - // "TRAINING_COMPLETE" - The model has successfully completed training. - // "READY_FOR_SERVING" - The model is ready for serving. - // "TRAINING_FAILED" - The model training failed. - ModelState string `json:"modelState,omitempty"` - ModelVersion int64 `json:"modelVersion,omitempty,string"` - // Name: Required. The fully qualified resource name of the model. Format: - // `projects/{project_number}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be - // an alpha-numerical string with limit of 40 characters. - Name string `json:"name,omitempty"` - // TrainingStartTime: Timestamp the model training was initiated. - TrainingStartTime string `json:"trainingStartTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1alphaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1alphaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API + // NullFields is a list of field names (e.g. "Boost") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCustomTuningModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCustomTuningModel +func (s *GoogleCloudDiscoveryengineV1alphaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlBoostAction return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global -// settings and configs at the DataStore level. -type GoogleCloudDiscoveryengineV1alphaDataStore struct { - // AclEnabled: Immutable. Whether data in the DataStore has ACL information. If +func (s *GoogleCloudDiscoveryengineV1alphaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1alphaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1alphaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1alphaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata: Metadata related +// to the progress of the DataStoreService.CreateDataStore operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata: Metadata related to +// the progress of the EngineService.CreateEngine operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for Create +// Schema LRO. +type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata: Metadata related +// to the progress of the SiteSearchEngineService.CreateTargetSite operation. +// This will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCustomTuningModel: Metadata that describes +// a custom tuned model. +type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { + // CreateTime: Timestamp the Model was created at. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: The display name of the model. + DisplayName string `json:"displayName,omitempty"` + // ModelState: The state that the model is in (e.g.`TRAINING` or + // `TRAINING_FAILED`). + // + // Possible values: + // "MODEL_STATE_UNSPECIFIED" - Default value. + // "TRAINING_PAUSED" - The model is in a paused training state. + // "TRAINING" - The model is currently training. + // "TRAINING_COMPLETE" - The model has successfully completed training. + // "READY_FOR_SERVING" - The model is ready for serving. + // "TRAINING_FAILED" - The model training failed. + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` + // Name: Required. The fully qualified resource name of the model. Format: + // `projects/{project_number}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be + // an alpha-numerical string with limit of 40 characters. + Name string `json:"name,omitempty"` + // TrainingStartTime: Timestamp the model training was initiated. + TrainingStartTime string `json:"trainingStartTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCustomTuningModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomTuningModel + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1alphaDataStore struct { + // AclEnabled: Immutable. Whether data in the DataStore has ACL information. If // set to `true`, the source data must have ACL. ACL will be ingested when data // is ingested by DocumentService.ImportDocuments methods. When ACL is enabled // for the DataStore, Document can't be accessed by calling @@ -8472,9 +9262,8 @@ func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON( // GoogleCloudDiscoveryengineV1alphaEngineCommonConfig: Common configurations // for an Engine. type GoogleCloudDiscoveryengineV1alphaEngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -8750,6 +9539,7 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { // "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED" - Value used when unset. // "METATAGS" - Retrieve value from meta tag. // "PAGEMAP" - Retrieve value from page map. + // "SCHEMA_ORG" - Retrieve value from schema.org data. AdvancedSiteSearchDataSources []string `json:"advancedSiteSearchDataSources,omitempty"` // CompletableOption: If completable_option is COMPLETABLE_ENABLED, field // values are directly used and returned as suggestions for Autocomplete in @@ -8858,6 +9648,15 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema field. // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema field. RetrievableOption string `json:"retrievableOption,omitempty"` + // SchemaOrgPaths: Field paths for indexing custom attribute from schema.org + // data. More details of schema.org and its defined types can be found at + // schema.org (https://schema.org). It is only used on advanced site search + // schema. Currently only support full path from root. The full path to a field + // is constructed by concatenating field names, starting from `_root`, with a + // period `.` as the delimiter. Examples: * Publish date of the root: + // _root.datePublished * Publish date of the reviews: + // _root.review.datePublished + SchemaOrgPaths []string `json:"schemaOrgPaths,omitempty"` // SearchableOption: If searchable_option is SEARCHABLE_ENABLED, field values // are searchable by text queries in SearchService.Search. If // SEARCHABLE_ENABLED but field type is numerical, field values will not be @@ -10033,74 +10832,354 @@ func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) Marshal return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to -// the progress of the DataStoreService.CreateDataStore operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1betaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCondition return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateEngineMetadata: Metadata related to -// the progress of the EngineService.CreateEngine operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to +// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API + // NullFields is a list of field names (e.g. "FullMatch") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata +func (s *GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create -// Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` +// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1betaControl struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControl + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to +// the progress of the DataStoreService.CreateDataStore operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateEngineMetadata: Metadata related to +// the progress of the EngineService.CreateEngine operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for Create +// Schema LRO. +type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. "CreateTime") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See @@ -10151,14 +11230,15 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // `TRAINING_FAILED`). // // Possible values: - // "MODEL_STATE_UNSPECIFIED" + // "MODEL_STATE_UNSPECIFIED" - Default value. // "TRAINING_PAUSED" - The model is in a paused training state. // "TRAINING" - The model is currently training. // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. - ModelState string `json:"modelState,omitempty"` - ModelVersion int64 `json:"modelVersion,omitempty,string"` + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: // `projects/{project_number}/locations/{location}/collections/{collection}/data // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be @@ -10720,9 +11800,8 @@ func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() // GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations // for an Engine. type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -11011,21 +12090,23 @@ func (s *GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to -// the progress of the PurgeDocuments operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1betaProject struct { + // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // IgnoredCount: Count of entries that were ignored as entries were not found. - IgnoredCount int64 `json:"ignoredCount,omitempty,string"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,omitempty"` // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -11039,44 +12120,128 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata - return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response message for -// DocumentService.PurgeDocuments method. If the long running operation is -// successfully done, then this message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` - // PurgeSample: A sample of document names that will be deleted. Only populated - // if `force` is set to false. A max of 100 names will be returned and the - // names are chosen at random. - PurgeSample []string `json:"purgeSample,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProject return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata: -// Metadata related to the progress of the PurgeSuggestionDenyListEntries -// operation. This is returned by the google.longrunning.Operation.metadata +// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the +// terms of service. +type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata +// associated with a project provision operation. +type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to +// the progress of the PurgeDocuments operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse: Response message for +// DocumentService.PurgeDocuments method. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + // PurgeSample: A sample of document names that will be deleted. Only populated + // if `force` is set to false. A max of 100 names will be returned and the + // names are chosen at random. + PurgeSample []string `json:"purgeSample,omitempty"` + // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PurgeCount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata: +// Metadata related to the progress of the PurgeSuggestionDenyListEntries +// operation. This is returned by the google.longrunning.Operation.metadata // field. type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata struct { // CreateTime: Operation create time. @@ -11621,6 +12786,112 @@ func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type ProjectsProvisionCall struct { + s *Service + name string + googleclouddiscoveryenginev1provisionprojectrequest *GoogleCloudDiscoveryengineV1ProvisionProjectRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Provision: Provisions the project resource. During the process, related +// systems will get prepared and initialized. Caller must read the Terms for +// data use (https://cloud.google.com/retail/data-use-terms), and optionally +// specify in request to provide consent to that service terms. +// +// - name: Full resource name of a Project, such as +// `projects/{project_id_or_number}`. +func (r *ProjectsService) Provision(name string, googleclouddiscoveryenginev1provisionprojectrequest *GoogleCloudDiscoveryengineV1ProvisionProjectRequest) *ProjectsProvisionCall { + c := &ProjectsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1provisionprojectrequest = googleclouddiscoveryenginev1provisionprojectrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsProvisionCall) Fields(s ...googleapi.Field) *ProjectsProvisionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsProvisionCall) Context(ctx context.Context) *ProjectsProvisionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsProvisionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsProvisionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1provisionprojectrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:provision") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.provision" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsProvisionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { s *Service name string @@ -12514,7 +13785,7 @@ func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *Pro } // Filter sets the optional parameter "filter": Filter by solution type . For -// example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { c.urlParams_.Set("filter", filter) return c @@ -13954,64 +15225,71 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1converseconversationrequest = googleclouddiscoveryenginev1converseconversationrequest +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1control = googleclouddiscoveryenginev1control + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1converseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1control) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14019,18 +15297,18 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ } 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.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ConverseConversationResponse.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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ConverseConversationResponse, error) { +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14049,7 +15327,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1Control{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14062,127 +15340,22 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. -// -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1Conversation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14190,27 +15363,27 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -14228,13 +15401,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14266,7 +15439,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -14275,13 +15448,13 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Control. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14289,7 +15462,7 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14297,27 +15470,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s .. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -14338,13 +15511,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14363,7 +15536,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Conversation{ + ret := &GoogleCloudDiscoveryengineV1Control{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14376,7 +15549,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { +type ProjectsLocationsCollectionsDataStoresControlsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -14385,45 +15558,36 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of results // to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -14431,7 +15595,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14439,27 +15603,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s . // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -14467,7 +15631,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14480,13 +15644,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListConversationsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1ListControlsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14505,7 +15669,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1ListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14521,7 +15685,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -14539,34 +15703,32 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx } } -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation + c.googleclouddiscoveryenginev1control = googleclouddiscoveryenginev1control return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -14574,30 +15736,30 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1control) if err != nil { return nil, err } @@ -14616,13 +15778,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14641,7 +15803,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Conversation{ + ret := &GoogleCloudDiscoveryengineV1Control{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14654,68 +15816,66 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest + 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1converseconversationrequest = googleclouddiscoveryenginev1converseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1converseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}: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 } @@ -14726,13 +15886,13 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1ConverseConversationResponse.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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14751,7 +15911,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1ConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14764,104 +15924,80 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation + 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14880,7 +16016,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1Conversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14893,43 +16029,22 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -14937,45 +16052,34 @@ func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14986,13 +16090,13 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15011,7 +16115,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15024,7 +16128,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15033,40 +16137,21 @@ type ProjectsLocationsCollectionsDataStoresOperationsListCall 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 Conversation. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15074,27 +16159,27 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15102,7 +16187,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15115,13 +16200,13 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15140,7 +16225,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1Conversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15153,92 +16238,100 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1schema = googleclouddiscoveryenginev1schema return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to use for -// the Schema, which becomes the final component of the Schema.name. This field -// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard -// with a length limit of 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1schema) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -15249,13 +16342,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1ListConversationsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15274,7 +16367,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1ListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15287,56 +16380,94 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Schema. +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -15347,13 +16478,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15372,7 +16503,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1Conversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15385,7 +16516,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15394,13 +16525,13 @@ type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15408,7 +16539,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15416,27 +16547,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15457,13 +16588,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Schema.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Schema, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15482,7 +16613,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Schema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15495,40 +16626,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Schemas. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// Schemas to return. The service may return fewer than this value. If -// unspecified, at most 100 Schemas are returned. The maximum value is 1000; -// values above 1000 are set to 1000. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous SchemaService.ListSchemas call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// SchemaService.ListSchemas must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15536,7 +16668,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15544,27 +16676,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15572,7 +16704,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15580,18 +16712,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListSchemasResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListSchemasResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15610,7 +16742,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListSchemasResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15626,7 +16758,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListSchemasResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -15644,120 +16776,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx contex } } -type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Schema. -// -// - name: Immutable. The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1schema = googleclouddiscoveryenginev1schema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Schema is not found, a new Schema is created. In this situation, -// `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1schema) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15771,8 +16790,8 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15780,7 +16799,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(nam // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15788,27 +16807,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields( // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15829,13 +16848,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15867,7 +16886,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15880,28 +16899,28 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15909,7 +16928,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15917,27 +16936,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15958,13 +16977,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15999,7 +17018,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16017,63 +17036,69 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages( } } -type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Create: Creates a Schema. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1schema = googleclouddiscoveryenginev1schema + return c +} + +// SchemaId sets the optional parameter "schemaId": Required. The ID to use for +// the Schema, which becomes the final component of the Schema.name. This field +// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard +// with a length limit of 63 characters. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1schema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -16081,18 +17106,18 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16111,7 +17136,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16124,85 +17149,73 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// Delete: Deletes a Schema. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1recommendrequest = googleclouddiscoveryenginev1recommendrequest +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1recommendrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1RecommendResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1RecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16221,7 +17234,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1RecommendResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16234,83 +17247,85 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Get: Gets a Schema. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Schema.ServerResponse.Header or (if a response +// was returned 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) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Schema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16329,7 +17344,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1SearchResponse{ + ret := &GoogleCloudDiscoveryengineV1Schema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16342,84 +17357,86 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// List: Gets a list of Schemas. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// Schemas to return. The service may return fewer than this value. If +// unspecified, at most 100 Schemas are returned. The maximum value is 1000; +// values above 1000 are set to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous SchemaService.ListSchemas call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SchemaService.ListSchemas must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -16430,13 +17447,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListSchemasResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16455,7 +17472,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Session{ + ret := &GoogleCloudDiscoveryengineV1ListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16468,57 +17485,92 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListSchemasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Schema. // -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1schema *GoogleCloudDiscoveryengineV1Schema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1schema = googleclouddiscoveryenginev1schema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Schema is not found, a new Schema is created. In this situation, +// `update_mask` is ignored. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1schema) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -16529,13 +17581,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16554,7 +17606,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16567,7 +17619,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16576,13 +17628,13 @@ type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { header_ http.Header } -// Get: Gets a Session. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16590,7 +17642,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16598,27 +17650,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16639,13 +17691,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16664,7 +17716,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Session{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16677,54 +17729,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -16732,7 +17771,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16740,27 +17779,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...goo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16768,7 +17807,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16776,18 +17815,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListSessionsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListSessionsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16806,7 +17845,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListSessionsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16822,7 +17861,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListSessionsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16840,88 +17879,82 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx conte } } -type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Answer: Answer query method. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16940,7 +17973,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Session{ + ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16953,85 +17986,85 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Answer. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1recommendrequest = googleclouddiscoveryenginev1recommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1recommendrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.collections.dataStores.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Answer.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1RecommendResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Answer, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1RecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17050,7 +18083,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Answer{ + ret := &GoogleCloudDiscoveryengineV1RecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17063,61 +18096,64 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1batchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest + 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. +// Search: Performs a search. // -// - parent: The parent resource shared by all TargetSites being verified. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1batchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1batchverifytargetsitesrequest = googleclouddiscoveryenginev1batchverifytargetsitesrequest +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1batchverifytargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17125,18 +18161,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17155,7 +18191,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1SearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17168,61 +18204,82 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1disableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest - 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken + } } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site -// search. +type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1disableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1disableadvancedsitesearchrequest = googleclouddiscoveryenginev1disableadvancedsitesearchrequest +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1disableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17230,18 +18287,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17260,7 +18317,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1Session{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17273,80 +18330,74 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1enableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site -// search. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1enableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1enableadvancedsitesearchrequest = googleclouddiscoveryenginev1enableadvancedsitesearchrequest +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1enableadvancedsitesearchrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned 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) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17365,7 +18416,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17378,53 +18429,30 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// FetchDomainVerificationStatus: Returns list of target sites with its domain -// verification status. This method can only be called under data store with -// BASIC_SITE_SEARCH state at the moment. +// Get: Gets a Session. // -// - siteSearchEngine: The site search engine resource under which we fetch all -// the domain verification status. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - return c -} - -// PageSize sets the optional parameter "pageSize": 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) +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17432,27 +18460,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17460,7 +18488,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17468,18 +18496,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse, error) { +// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17498,7 +18526,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse{ + ret := &GoogleCloudDiscoveryengineV1Session{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17511,99 +18539,117 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1recrawlurisrequest *GoogleCloudDiscoveryengineV1RecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// List: Lists all Sessions by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c } -// RecrawlUris: Request on-demand recrawl for a list of URIs. -// -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1recrawlurisrequest *GoogleCloudDiscoveryengineV1RecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1recrawlurisrequest = googleclouddiscoveryenginev1recrawlurisrequest +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1recrawlurisrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListSessionsResponse.ServerResponse.Header or +// (if a response was returned 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 *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17622,7 +18668,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1ListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17635,68 +18681,92 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListSessionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -17707,13 +18777,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response +// was returned 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 *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17732,7 +18802,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1Session{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17745,7 +18815,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17754,40 +18824,21 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall st header_ http.Header } -// List: Lists operations that match the specified filter in the request. If -// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// Get: Gets a Answer. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17795,27 +18846,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17823,7 +18874,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, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17836,13 +18887,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Answer.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Answer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17861,7 +18912,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1Answer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17874,82 +18925,61 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { s *Service parent string - googleclouddiscoveryenginev1batchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest + googleclouddiscoveryenginev1batchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. This +// API sends all the target sites under site search engine for verification. // -// - parent: The parent resource shared by all TargetSites being created. +// - parent: The parent resource shared by all TargetSites being verified. // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1batchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1batchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1BatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1batchcreatetargetsitesrequest = googleclouddiscoveryenginev1batchcreatetargetsitesrequest + c.googleclouddiscoveryenginev1batchverifytargetsitesrequest = googleclouddiscoveryenginev1batchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1batchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1batchverifytargetsitesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchVerifyTargetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17962,13 +18992,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18000,60 +19030,61 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1disableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site +// search. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1targetsite = googleclouddiscoveryenginev1targetsite +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1disableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1DisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1disableadvancedsitesearchrequest = googleclouddiscoveryenginev1disableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1targetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1disableadvancedsitesearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:disableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18061,18 +19092,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } 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.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) 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 { @@ -18104,189 +19135,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1enableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a TargetSite. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site +// search. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1enableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1EnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1enableadvancedsitesearchrequest = googleclouddiscoveryenginev1enableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1enableadvancedsitesearchrequest) if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a TargetSite. -// -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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.targetSites.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1TargetSite.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1TargetSite, 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 { @@ -18305,7 +19227,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1TargetSite{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18318,25 +19240,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { - s *Service - parent 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: Gets a list of TargetSites. +// FetchDomainVerificationStatus: Returns list of target sites with its domain +// verification status. This method can only be called under data store with +// BASIC_SITE_SEARCH state at the moment. // -// - parent: The parent site search engine resource name, such as +// - siteSearchEngine: The site search engine resource under which we fetch all +// the domain verification status. // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. 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 +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } @@ -18345,16 +19268,17 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // 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 { +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 `ListTargetSites` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListTargetSites` must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// from a previous `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 } @@ -18362,7 +19286,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18370,27 +19294,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18398,7 +19322,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:fetchDomainVerificationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18406,18 +19330,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } 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.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListTargetSitesResponse.ServerResponse.Header -// or (if a response was returned 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) (*GoogleCloudDiscoveryengineV1ListTargetSitesResponse, error) { +// *GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse.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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18436,7 +19360,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListTargetSitesResponse{ + ret := &GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18452,7 +19376,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListTargetSitesResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1FetchDomainVerificationStatusResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18470,80 +19394,78 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1recrawlurisrequest *GoogleCloudDiscoveryengineV1RecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - name: Output only. The fully qualified resource name of the target site. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The -// `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1targetsite = googleclouddiscoveryenginev1targetsite +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1recrawlurisrequest *GoogleCloudDiscoveryengineV1RecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1recrawlurisrequest = googleclouddiscoveryenginev1recrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1targetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1recrawlurisrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+siteSearchEngine}:recrawlUris") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) 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 { @@ -18575,7 +19497,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18589,8 +19511,8 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18598,7 +19520,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18606,27 +19528,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18647,13 +19569,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 { @@ -18685,7 +19607,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18698,28 +19620,28 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - 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)} +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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18727,7 +19649,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18735,27 +19657,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18776,13 +19698,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 { @@ -18817,7 +19739,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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18835,60 +19757,61 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } } -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1batchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// BatchCreate: Creates TargetSite in a batch. // -// - 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, googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource shared by all TargetSites being created. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1batchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1BatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest + c.googleclouddiscoveryenginev1batchcreatetargetsitesrequest = googleclouddiscoveryenginev1batchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1batchcreatetargetsitesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetSites:batchCreate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18901,13 +19824,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18939,60 +19862,60 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return ret, nil } -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. +// Create: Creates a TargetSite. // -// - 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, googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest + c.googleclouddiscoveryenginev1targetsite = googleclouddiscoveryenginev1targetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1targetsite) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19005,13 +19928,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal 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.create" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19043,112 +19966,76 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Collect: Writes a single user event from the browser. This uses a GET -// request to due to browser restriction of POST-ing to a third-party domain. -// This method is used only by the Discovery Engine API JavaScript pixel and -// Google Tag Manager. Users should not call this method directly. +// Delete: Deletes a TargetSite. // -// - parent: The parent DataStore resource name, such as +// - name: Full resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at -// 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) { +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19167,7 +20054,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19180,83 +20067,88 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1importusereventsrequest *GoogleCloudDiscoveryengineV1ImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of user events. Request processing might be synchronous. -// Events that already exist are skipped. Use this method for backfilling -// historical user events. Operation.response is of type ImportResponse. Note -// that it is possible for a subset of the items to be successfully inserted. -// Operation.metadata is of type ImportMetadata. +// Get: Gets a TargetSite. // -// - parent: Parent DataStore resource name, of the form +// - name: Full resource name of TargetSite, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1importusereventsrequest *GoogleCloudDiscoveryengineV1ImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1importusereventsrequest = googleclouddiscoveryenginev1importusereventsrequest +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1importusereventsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1TargetSite.ServerResponse.Header or (if a +// response was returned 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1TargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19275,7 +20167,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1TargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19288,65 +20180,89 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1userevent *GoogleCloudDiscoveryengineV1UserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// List: Gets a list of TargetSites. // -// - parent: The parent resource name. If the write user event action is -// applied in DataStore level, the format is: +// - parent: The parent site search engine resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. If the write user event action is applied in Location -// level, for example, the event with Document across multiple DataStore, the -// format is: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1userevent *GoogleCloudDiscoveryengineV1UserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to list TargetSites under this site search engine, regardless of whether +// or not this branch exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1userevent = googleclouddiscoveryenginev1userevent + 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) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1userevent) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -19357,13 +20273,13 @@ 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. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1UserEvent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1ListTargetSitesResponse.ServerResponse.Header +// or (if a response was returned 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) (*GoogleCloudDiscoveryengineV1UserEvent, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19382,7 +20298,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1UserEvent{ + ret := &GoogleCloudDiscoveryengineV1ListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19395,88 +20311,101 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine - 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListTargetSitesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Creates a Engine. -// -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1engine = googleclouddiscoveryenginev1engine - return c +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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) +// Patch: Updates a TargetSite. +// +// - name: Output only. The fully qualified resource name of the target site. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The +// `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1targetsite *GoogleCloudDiscoveryengineV1TargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1targetsite = googleclouddiscoveryenginev1targetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1engine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1targetsite) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19508,24 +20437,22 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Engine. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. If the caller does not have permission to delete the -// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the Engine to delete does not exist, a NOT_FOUND error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The 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 } @@ -19533,106 +20460,7 @@ func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsEnginesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a Engine. -// -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19640,27 +20468,27 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19681,13 +20509,13 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Engine.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Engine, 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 { @@ -19706,7 +20534,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Engine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19719,40 +20547,41 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsCollectionsEnginesListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the Engines 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 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 +// - 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": Filter by solution type. For -// example: solution_type=SOLUTION_TYPE_SEARCH -func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { +// 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 } @@ -19760,7 +20589,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19768,27 +20597,27 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19796,7 +20625,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19804,18 +20633,18 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht } 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.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListEnginesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListEnginesResponse, 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 { @@ -19834,7 +20663,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListEnginesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19850,7 +20679,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListEnginesResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -19868,90 +20697,79 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, } } -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - name: Immutable. The fully qualified resource name of the engine. This -// field must be a UTF-8 encoded string with a length limit of 1024 -// characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are -// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1engine = googleclouddiscoveryenginev1engine - 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) +// - 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, googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1ImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1engine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1importsuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Engine.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Engine, 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 { @@ -19970,7 +20788,7 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Engine{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19983,64 +20801,60 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1converseconversationrequest = googleclouddiscoveryenginev1converseconversationrequest +// - 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, googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1converseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1purgesuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20048,18 +20862,18 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } 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.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ConverseConversationResponse.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 *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ConverseConversationResponse, error) { +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20078,7 +20892,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ConverseConversationResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20091,63 +20905,95 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation - 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 Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party domain. +// This method is used only by the Discovery Engine API JavaScript pixel and +// Google Tag Manager. Users should not call this method directly. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation + 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 // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -20158,13 +21004,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a -// response was returned 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) (*GoogleCloudDiscoveryengineV1Conversation, error) { +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20183,7 +21029,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Conversation{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20196,74 +21042,83 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1importusereventsrequest *GoogleCloudDiscoveryengineV1ImportUserEventsRequest + 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. +// Import: Bulk import of user events. Request processing might be synchronous. +// Events that already exist are skipped. Use this method for backfilling +// historical user events. Operation.response is of type ImportResponse. Note +// that it is possible for a subset of the items to be successfully inserted. +// Operation.metadata is of type ImportMetadata. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1importusereventsrequest *GoogleCloudDiscoveryengineV1ImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1importusereventsrequest = googleclouddiscoveryenginev1importusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1importusereventsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/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.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. // Any non-2xx status code is an error. Response headers are in either -// *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) { +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20282,7 +21137,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, @@ -20295,85 +21150,90 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1userevent *GoogleCloudDiscoveryengineV1UserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Write: Writes a single user event. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name. If the write user event action is +// applied in DataStore level, the format is: +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. If the write user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1userevent *GoogleCloudDiscoveryengineV1UserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1userevent = googleclouddiscoveryenginev1userevent + return c +} + +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1userevent) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/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.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1UserEvent.ServerResponse.Header or (if a // response was returned 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) (*GoogleCloudDiscoveryengineV1Conversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1UserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20392,7 +21252,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Conversation{ + ret := &GoogleCloudDiscoveryengineV1UserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20405,100 +21265,71 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Create: Creates a Engine. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googleclouddiscoveryenginev1engine = googleclouddiscoveryenginev1engine 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) +// EngineId sets the optional parameter "engineId": Required. The ID to use for +// the Engine, which will become the final component of the Engine's resource +// name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1engine) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -20509,13 +21340,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListConversationsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20534,7 +21365,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListConversationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20547,94 +21378,59 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation - 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 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 Engine. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. If the caller does not have permission to delete the +// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the Engine to delete does not exist, a NOT_FOUND error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20645,13 +21441,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Conversation, 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 { @@ -20670,7 +21466,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Conversation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20683,7 +21479,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20692,13 +21488,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 Engine. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { - c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20706,7 +21502,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 // details. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20714,27 +21510,27 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) 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 *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20755,13 +21551,13 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Engine.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Engine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20780,7 +21576,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1Engine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20793,41 +21589,40 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesListCall 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 the Engines associated with the project. // -// - 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 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": The standard list filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// 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": The standard list page -// size. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// 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": The standard list page -// token. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -20835,7 +21630,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 // details. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20843,27 +21638,27 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) 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 *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20871,7 +21666,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, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20879,18 +21674,18 @@ 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. +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListEnginesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20909,7 +21704,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1ListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20925,7 +21720,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 *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListEnginesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -20943,63 +21738,186 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx contex } } -type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Patch: Updates an Engine // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest +// - name: Immutable. The fully qualified resource name of the engine. This +// field must be a UTF-8 encoded string with a length limit of 1024 +// characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}` engine should be 1-63 characters, and valid characters are +// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1engine *GoogleCloudDiscoveryengineV1Engine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1engine = googleclouddiscoveryenginev1engine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Engine to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1engine) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Engine.ServerResponse.Header or (if a response +// was returned 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) (*GoogleCloudDiscoveryengineV1Engine, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Engine{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1control = googleclouddiscoveryenginev1control + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("controlId", controlId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1control) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21007,18 +21925,18 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21037,7 +21955,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1Control{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21050,85 +21968,2071 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// Delete: Deletes a Control. If the Control to delete 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/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1recommendrequest = googleclouddiscoveryenginev1recommendrequest +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesControlsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Control. +// +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Control{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesControlsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Controls by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/controls") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ListControlsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListControlsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ListControlsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListControlsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1control = googleclouddiscoveryenginev1control + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1control) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Control{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest + 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/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1converseconversationrequest *GoogleCloudDiscoveryengineV1ConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1converseconversationrequest = googleclouddiscoveryenginev1converseconversationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1converseconversationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:converse") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ConverseConversationResponse.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 *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ConverseConversationResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ConverseConversationResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1Conversation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Conversation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. +// +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Conversation. +// +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1Conversation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Conversation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Conversations by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *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": 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) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/conversations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ListConversationsResponse.ServerResponse.Header +// or (if a response was returned 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) (*GoogleCloudDiscoveryengineV1ListConversationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1ListConversationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1conversation *GoogleCloudDiscoveryengineV1Conversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1conversation = googleclouddiscoveryenginev1conversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1conversation) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Conversation.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1Conversation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Conversation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesOperationsGetCall 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 *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Answer: Answer query method. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:answer") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Recommend: Makes a recommendation, which requires a contextual user event. +// +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1recommendrequest *GoogleCloudDiscoveryengineV1RecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1recommendrequest = googleclouddiscoveryenginev1recommendrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1recommendrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:recommend") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1RecommendResponse.ServerResponse.Header or (if +// a response was returned 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) (*GoogleCloudDiscoveryengineV1RecommendResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1RecommendResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Search: Performs a search. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:search") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1SearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken + } +} + +type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Session{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. +// +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Session. +// +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1recommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1RecommendResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response +// was returned 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) (*GoogleCloudDiscoveryengineV1RecommendResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21147,7 +24051,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1RecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1Session{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21160,83 +24064,117 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists all Sessions by their parent DataStore. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListSessionsResponse.ServerResponse.Header or +// (if a response was returned 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) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21255,7 +24193,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1SearchResponse{ + ret := &GoogleCloudDiscoveryengineV1ListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21271,9 +24209,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(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListSessionsResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -21285,56 +24223,64 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { +type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { s *Service - parent string + name string googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { - c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session return c } +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) @@ -21343,26 +24289,26 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt st } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21394,22 +24340,22 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// Get: Gets a Answer. // -// - name: The resource name of the Session to delete. Format: +// - name: The resource name of the Answer to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21417,34 +24363,45 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -21455,13 +24412,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1Answer.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Answer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21480,7 +24437,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1Answer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21493,7 +24450,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21502,13 +24459,13 @@ type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { header_ http.Header } -// Get: Gets a Session. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -21516,7 +24473,7 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21524,27 +24481,27 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googlea // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21565,13 +24522,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21590,7 +24547,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Session{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21603,54 +24560,41 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// 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 } @@ -21658,7 +24602,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21666,27 +24610,27 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21694,7 +24638,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21702,18 +24646,18 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListSessionsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListSessionsResponse, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21732,7 +24676,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListSessionsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21748,7 +24692,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListSessionsResponse) error) error { +func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -21766,88 +24710,134 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context. } } -type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session - 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 Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// CompleteQuery: Completes the specified user input with keyword suggestions. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1session *GoogleCloudDiscoveryengineV1Session) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1session = googleclouddiscoveryenginev1session +// - dataStore: The parent data store resource name for which the completion is +// performed, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": +// Indicates if tail suggestions should be returned if there are no suggestions +// that match the full query. Even if set to true, if there are suggestions +// that match the full query, those are returned and no tail suggestions are +// returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead input +// used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions generated +// from the past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using suggestions +// generated from user-imported search events. * `document-completable` - Using +// suggestions taken directly from user-imported document fields marked as +// completable. Default values: * `document` is the default model for regular +// dataStores. * `search-history` is the default model for site search +// dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier +// for tracking visitors. For example, this could be implemented with an HTTP +// cookie, which should be able to uniquely identify a visitor on a single +// device. This unique identifier should not change if the visitor logs in or +// out of the website. This field should NOT have a fixed value such as +// `unknown_visitor`. This should be the same identifier as +// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be +// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1session) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataStore}:completeQuery") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Session.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1CompleteQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Session, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1CompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21866,7 +24856,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Session{ + ret := &GoogleCloudDiscoveryengineV1CompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21879,85 +24869,100 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore + 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, googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1datastore = googleclouddiscoveryenginev1datastore + 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 } -// Get: Gets a Answer. -// -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to +// use for the DataStore, which will become the final component of the +// DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1datastore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Answer.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Answer, error) { +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21976,7 +24981,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Answer{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21989,22 +24994,24 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// Delete: Deletes a DataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to delete +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the DataStore to delete does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -22012,45 +25019,34 @@ func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) 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 *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -22061,13 +25057,13 @@ 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. +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22099,7 +25095,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsOperationsListCall struct { +type ProjectsLocationsDataStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -22108,40 +25104,24 @@ 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 DataStore. // -// - 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: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to access +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the requested DataStore does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22149,27 +25129,27 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.F // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) 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 *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22177,7 +25157,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, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22190,13 +25170,13 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1DataStore.ServerResponse.Header or (if a // response was returned 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 *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1DataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22215,7 +25195,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1DataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22228,100 +25208,32 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresCompleteQueryCall struct { +type ProjectsLocationsDataStoresGetSiteSearchEngineCall 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. +// GetSiteSearchEngine: Gets the SiteSearchEngine. // -// - dataStore: The parent data store resource name for which the completion is -// performed, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": -// Indicates if tail suggestions should be returned if there are no suggestions -// that match the full query. Even if set to true, if there are suggestions -// that match the full query, those are returned and no tail suggestions are -// returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead input -// used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions generated -// from the past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using suggestions -// generated from user-imported search events. * `document-completable` - Using -// suggestions taken directly from user-imported document fields marked as -// completable. Default values: * `document` is the default model for regular -// dataStores. * `search-history` is the default model for site search -// dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c -} - -// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier -// for tracking visitors. For example, this could be implemented with an HTTP -// cookie, which should be able to uniquely identify a visitor on a single -// device. This unique identifier should not change if the visitor logs in or -// out of the website. This field should NOT have a fixed value such as -// `unknown_visitor`. This should be the same identifier as -// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be -// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to access the [SiteSearchEngine], regardless of whether or not it exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22329,27 +25241,27 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22357,7 +25269,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, "v1/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22365,18 +25277,18 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1CompleteQueryResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1SiteSearchEngine.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1CompleteQueryResponse, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SiteSearchEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22395,7 +25307,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1CompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1SiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22408,83 +25320,97 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// 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 the DataStores associated with the project. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id}`. If +// the caller does not have permission to list DataStores under this +// location, regardless of whether or not this data store exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1datastore = googleclouddiscoveryenginev1datastore return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user want to -// directly create an advanced data store for site search. If the data store is -// not configured as site search (GENERIC vertical and PUBLIC_WEBSITE -// content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// Filter sets the optional parameter "filter": 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 } -// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to -// use for the DataStore, which will become the final component of the -// DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum allowed +// value is 50. Values above 50 will be coerced to 50. If this field is +// negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the page +// token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1datastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -22495,13 +25421,13 @@ func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListDataStoresResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListDataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22520,7 +25446,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1ListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22533,59 +25459,92 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListDataStoresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a DataStore. +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore // -// - name: Full resource name of DataStore, such as +// - name: Immutable. The full resource name of the data store. Format: // `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to delete -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the DataStore to delete does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a +// length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1datastore = googleclouddiscoveryenginev1datastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DataStore to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1datastore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -22596,13 +25555,13 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1DataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1DataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22621,7 +25580,7 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1DataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22634,88 +25593,92 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Create: Creates a Document. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to access -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the requested DataStore does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1document = googleclouddiscoveryenginev1document + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID to use +// for the Document, which becomes the final component of the Document.name. If +// the caller does not have permission to create the Document, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. This +// field must be unique among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1document) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/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.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1DataStore.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1Document.ServerResponse.Header or (if a // response was returned 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) (*GoogleCloudDiscoveryengineV1DataStore, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Document, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22734,7 +25697,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1DataStore{ + ret := &GoogleCloudDiscoveryengineV1Document{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22747,24 +25710,24 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Delete: Deletes a Document. // -// - name: Resource name of SiteSearchEngine, such as +// - name: Full resource name of Document, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to access the [SiteSearchEngine], regardless of whether or not it exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to delete the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the Document to +// delete does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -22772,45 +25735,34 @@ func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -22821,13 +25773,13 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1SiteSearchEngine.ServerResponse.Header or (if a -// response was returned 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) (*GoogleCloudDiscoveryengineV1SiteSearchEngine, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22846,7 +25798,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1SiteSearchEngine{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22859,59 +25811,33 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresListCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// Get: Gets a Document. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. If -// the caller does not have permission to list DataStores under this -// location, regardless of whether or not this data store exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { - c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter by solution type . For -// example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' -func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum allowed -// value is 50. Values above 50 will be coerced to 50. If this field is -// negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the page -// token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22919,27 +25845,27 @@ func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22947,7 +25873,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, "v1/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22955,18 +25881,18 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListDataStoresResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Document.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1ListDataStoresResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Document, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22985,7 +25911,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListDataStoresResponse{ + ret := &GoogleCloudDiscoveryengineV1Document{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22998,109 +25924,81 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListDataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1importdocumentsrequest *GoogleCloudDiscoveryengineV1ImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items are created. Note: It is possible for a +// subset of the Documents to be successfully updated. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a -// length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1datastore *GoogleCloudDiscoveryengineV1DataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1datastore = googleclouddiscoveryenginev1datastore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided DataStore to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1importdocumentsrequest *GoogleCloudDiscoveryengineV1ImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1importdocumentsrequest = googleclouddiscoveryenginev1importdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *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. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1datastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1importdocumentsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1DataStore.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. +// Any non-2xx status code is 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 *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1DataStore, 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 { @@ -23119,7 +26017,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1DataStore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23132,75 +26030,91 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// List: Gets a list of Documents. // -// - parent: The parent resource name, such as +// - parent: The parent branch resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, +// to list documents under the default branch. If the caller does not have +// permission to list Documents under this branch, regardless of whether or +// not this branch exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1document = googleclouddiscoveryenginev1document return c } -// DocumentId sets the optional parameter "documentId": Required. The ID to use -// for the Document, which becomes the final component of the Document.name. If -// the caller does not have permission to create the Document, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. This -// field must be unique among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// PageSize sets the optional parameter "pageSize": Maximum number of Documents +// to return. If unspecified, defaults to 100. The maximum allowed value is +// 1000. Values above 1000 are set to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1document) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -23211,13 +26125,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Document.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListDocumentsResponse.ServerResponse.Header or +// (if a response was returned 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) (*GoogleCloudDiscoveryengineV1Document, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23236,7 +26150,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Document{ + ret := &GoogleCloudDiscoveryengineV1ListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23249,59 +26163,99 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Document. +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. // -// - name: Full resource name of Document, such as +// - name: Immutable. The full resource name of the document. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to delete the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the Document to -// delete does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must +// be a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1document = googleclouddiscoveryenginev1document + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the Document is not found, a new Document is be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'document' to update. If not set, by default +// updates all fields. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1document) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -23312,13 +26266,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1Document.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudDiscoveryengineV1Document, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23337,7 +26291,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1Document{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23350,88 +26304,84 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1purgedocumentsrequest *GoogleCloudDiscoveryengineV1PurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Document. +// Purge: Permanently deletes all selected Documents in a branch. This process +// is asynchronous. Depending on the number of Documents to be deleted, this +// operation can take hours to complete. Before the delete operation completes, +// some Documents might still be returned by DocumentService.GetDocument or +// DocumentService.ListDocuments. To get a list of the Documents to be deleted, +// set PurgeDocumentsRequest.force to false. // -// - name: Full resource name of Document, such as +// - parent: The parent resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to 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 +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1purgedocumentsrequest *GoogleCloudDiscoveryengineV1PurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1purgedocumentsrequest = googleclouddiscoveryenginev1purgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1purgedocumentsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Document.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Document, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23450,7 +26400,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Document{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23463,62 +26413,66 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1importdocumentsrequest *GoogleCloudDiscoveryengineV1ImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items are created. Note: It is possible for a -// subset of the Documents to be successfully updated. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Requires create/update permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1importdocumentsrequest *GoogleCloudDiscoveryengineV1ImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1importdocumentsrequest = googleclouddiscoveryenginev1importdocumentsrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1importdocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23526,18 +26480,18 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23556,7 +26510,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23569,53 +26523,30 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Documents. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, -// to list documents under the default branch. If the caller does not have -// permission to list Documents under this branch, regardless of whether or -// not this branch exists, a `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Documents -// to return. If unspecified, defaults to 100. The maximum allowed value is -// 1000. Values above 1000 are set to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23623,27 +26554,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23651,7 +26582,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, "v1/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23659,18 +26590,18 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1ListDocumentsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListDocumentsResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23689,7 +26620,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1ListDocumentsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23702,99 +26633,87 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListDocumentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document - 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 } -// Patch: Updates a Document. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must -// be a UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1document *GoogleCloudDiscoveryengineV1Document) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 - c.googleclouddiscoveryenginev1document = googleclouddiscoveryenginev1document return c } -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the Document is not found, a new Document is be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided imported 'document' to update. If not set, by default -// updates all fields. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1document) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 } @@ -23805,13 +26724,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1Document.ServerResponse.Header or (if a +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Document, 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 { @@ -23830,7 +26749,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1Document{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23840,68 +26759,95 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1purgedocumentsrequest *GoogleCloudDiscoveryengineV1PurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control + 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. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1purgedocumentsrequest *GoogleCloudDiscoveryengineV1PurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsDataStoresControlsCreateCall { + c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1purgedocumentsrequest = googleclouddiscoveryenginev1purgedocumentsrequest + c.googleclouddiscoveryenginev1control = googleclouddiscoveryenginev1control + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsCreateCall) 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 *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1purgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1control) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23914,13 +26860,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned 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 *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23939,7 +26885,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1Control{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23952,68 +26898,57 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { + c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -24024,13 +26959,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24062,7 +26997,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24071,13 +27006,13 @@ type ProjectsLocationsDataStoresBranchesOperationsGetCall 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 Control. // -// - 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 Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { + c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24085,7 +27020,7 @@ func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24093,27 +27028,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsGetCall) 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 *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24134,13 +27069,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24159,7 +27094,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1Control{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24172,41 +27107,45 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresControlsListCall 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 Controls by their parent DataStore. // -// - 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 +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { + c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24214,7 +27153,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24222,27 +27161,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24250,7 +27189,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, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24258,18 +27197,18 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1ListControlsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24288,7 +27227,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1ListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24304,7 +27243,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1ListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -24322,6 +27261,119 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx contex } } +type ProjectsLocationsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1control *GoogleCloudDiscoveryengineV1Control) *ProjectsLocationsDataStoresControlsPatchCall { + c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1control = googleclouddiscoveryenginev1control + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1control) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.controls.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1Control.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1Control, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1Control{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresConversationsConverseCall struct { s *Service name string @@ -28641,6 +31693,14 @@ func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, goog return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -29215,6 +32275,14 @@ func (r *ProjectsLocationsUserEventsService) Write(parent string, googleclouddis return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 46e261dcd7e..abc7c1b3015 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -546,7 +546,7 @@ ], "parameters": { "filter": { - "description": "Filter by solution type . For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "description": "Filter by solution type . For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`", "location": "query", "type": "string" }, @@ -1117,6 +1117,168 @@ } } }, + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "conversations": { "methods": { "converse": { @@ -2728,6 +2890,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1alpha/{+parent}/userEvents:write", @@ -2991,6 +3158,168 @@ } }, "resources": { + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.engines.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "conversations": { "methods": { "converse": { @@ -3896,7 +4225,7 @@ ], "parameters": { "filter": { - "description": "Filter by solution type . For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "description": "Filter by solution type . For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`", "location": "query", "type": "string" }, @@ -4439,11 +4768,173 @@ } } }, - "conversations": { + "controls": { "methods": { - "converse": { - "description": "Converses a conversation.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "conversations": { + "methods": { + "converse": { + "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": [ @@ -5743,6 +6234,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1alpha/{+parent}/userEvents:write", @@ -5977,6 +6473,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1alpha/{+parent}/userEvents:write", @@ -6067,7 +6568,7 @@ } } }, - "revision": "20240517", + "revision": "20240526", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -6247,6 +6748,200 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Condition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1Condition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Control": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1Control", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Condition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1CreateDataStoreMetadata", @@ -6717,7 +7412,7 @@ "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -6916,6 +7611,85 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Project": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1Project", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", @@ -7391,6 +8165,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", + "type": "boolean" + }, "ignoreNonAnswerSeekingQuery": { "description": "Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", "type": "boolean" @@ -7536,6 +8314,13 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec", "description": "Custom fine tuning configs." }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec" + }, + "type": "array" + }, "filter": { "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" @@ -7804,6 +8589,14 @@ "description": "Page identifier.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -7830,6 +8623,14 @@ "description": "Document resource name.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -8373,8 +9174,9 @@ "description": "Page span of the chunk." }, "relevanceScore": { - "description": "Represents the relevance score based on similarity. Higher score represents the chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse", + "description": "Output only. Represents the relevance score based on similarity. Higher score indicates higher chunk relevance. The score is in range [-1.0, 1.0]. Only populated on SearchService.SearchResponse.", "format": "double", + "readOnly": true, "type": "number" } }, @@ -8490,36 +9292,230 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion": { - "description": "Suggestions as search queries.", - "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion", + "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion": { + "description": "Suggestions as search queries.", + "id": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion", + "properties": { + "completableFieldPaths": { + "description": "The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.", + "items": { + "type": "string" + }, + "type": "array" + }, + "suggestion": { + "description": "The suggestion for the query.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCompletionInfo": { + "description": "Detailed completion information including completion attribution token and clicked completion info.", + "id": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", + "properties": { + "selectedPosition": { + "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0.", + "format": "int32", + "type": "integer" + }, + "selectedSuggestion": { + "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1alphaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1alphaControl", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", "properties": { - "completableFieldPaths": { - "description": "The unique document field paths that serve as the source of this suggestion if it was generated from completable fields. This field is only populated for the document-completable model.", - "items": { - "type": "string" - }, - "type": "array" - }, - "suggestion": { - "description": "The suggestion for the query.", + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCompletionInfo": { - "description": "Detailed completion information including completion attribution token and clicked completion info.", - "id": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", + "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", "properties": { - "selectedPosition": { - "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion position, starting from 0.", - "format": "int32", - "type": "integer" - }, - "selectedSuggestion": { - "description": "End user selected CompleteQueryResponse.QuerySuggestion.suggestion.", - "type": "string" + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -8822,7 +9818,7 @@ "TRAINING_FAILED" ], "enumDescriptions": [ - "", + "Default value.", "The model is in a paused training state.", "The model is currently training.", "The model has successfully completed training.", @@ -8832,6 +9828,7 @@ "type": "string" }, "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, @@ -9487,7 +10484,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -9801,12 +10798,14 @@ "enum": [ "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", "METATAGS", - "PAGEMAP" + "PAGEMAP", + "SCHEMA_ORG" ], "enumDescriptions": [ "Value used when unset.", "Retrieve value from meta tag.", - "Retrieve value from page map." + "Retrieve value from page map.", + "Retrieve value from schema.org data." ], "type": "string" }, @@ -9916,6 +10915,13 @@ ], "type": "string" }, + "schemaOrgPaths": { + "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", + "items": { + "type": "string" + }, + "type": "array" + }, "searchableOption": { "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", "enum": [ @@ -10400,6 +11406,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListControlsResponse": { + "description": "Response for ListControls method.", + "id": "GoogleCloudDiscoveryengineV1alphaListControlsResponse", + "properties": { + "controls": { + "description": "All the Controls for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControl" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListConversationsResponse": { "description": "Response for ListConversations method.", "id": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse", @@ -10981,6 +12005,13 @@ "description": "The number of results to return. If this is unset or no bigger than zero, returns all results.", "format": "int32", "type": "integer" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" } }, "type": "object" @@ -11588,7 +12619,7 @@ "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." }, "searchResultMode": { - "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`.", + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", "enum": [ "SEARCH_RESULT_MODE_UNSPECIFIED", "DOCUMENTS", @@ -12945,6 +13976,10 @@ "$ref": "GoogleCloudDiscoveryengineV1alphaCompletionInfo", "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "dataStore": { + "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", + "type": "string" + }, "directUserRequest": { "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", "type": "boolean" @@ -12956,6 +13991,10 @@ }, "type": "array" }, + "engine": { + "description": "The Engine resource name, in the form of `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. Optional. Only required for Engine produced user events. For example, user events from blended search.", + "type": "string" + }, "eventTime": { "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", "format": "google-datetime", @@ -13064,6 +14103,200 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1betaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1betaControl", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata", @@ -13156,7 +14389,7 @@ "TRAINING_FAILED" ], "enumDescriptions": [ - "", + "Default value.", "The model is in a paused training state.", "The model is currently training.", "The model has successfully completed training.", @@ -13166,6 +14399,7 @@ "type": "string" }, "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, @@ -13583,7 +14817,7 @@ "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -13796,6 +15030,85 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1betaProject", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 120e7ddaf18..3bba27f9ff1 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -247,6 +247,7 @@ type ProjectsLocationsCollectionsDataConnectorOperationsService struct { func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocationsCollectionsDataStoresService { rs := &ProjectsLocationsCollectionsDataStoresService{s: s} rs.Branches = NewProjectsLocationsCollectionsDataStoresBranchesService(s) + rs.Controls = NewProjectsLocationsCollectionsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsDataStoresConversationsService(s) rs.CustomModels = NewProjectsLocationsCollectionsDataStoresCustomModelsService(s) rs.Models = NewProjectsLocationsCollectionsDataStoresModelsService(s) @@ -265,6 +266,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { Branches *ProjectsLocationsCollectionsDataStoresBranchesService + Controls *ProjectsLocationsCollectionsDataStoresControlsService + Conversations *ProjectsLocationsCollectionsDataStoresConversationsService CustomModels *ProjectsLocationsCollectionsDataStoresCustomModelsService @@ -331,6 +334,15 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresControlsService(s *Service) *ProjectsLocationsCollectionsDataStoresControlsService { + rs := &ProjectsLocationsCollectionsDataStoresControlsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresControlsService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresConversationsService(s *Service) *ProjectsLocationsCollectionsDataStoresConversationsService { rs := &ProjectsLocationsCollectionsDataStoresConversationsService{s: s} return rs @@ -495,6 +507,7 @@ type ProjectsLocationsCollectionsDataStoresUserEventsService struct { func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocationsCollectionsEnginesService { rs := &ProjectsLocationsCollectionsEnginesService{s: s} + rs.Controls = NewProjectsLocationsCollectionsEnginesControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsEnginesConversationsService(s) rs.Operations = NewProjectsLocationsCollectionsEnginesOperationsService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsEnginesServingConfigsService(s) @@ -505,6 +518,8 @@ func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocation type ProjectsLocationsCollectionsEnginesService struct { s *Service + Controls *ProjectsLocationsCollectionsEnginesControlsService + Conversations *ProjectsLocationsCollectionsEnginesConversationsService Operations *ProjectsLocationsCollectionsEnginesOperationsService @@ -514,6 +529,15 @@ type ProjectsLocationsCollectionsEnginesService struct { Sessions *ProjectsLocationsCollectionsEnginesSessionsService } +func NewProjectsLocationsCollectionsEnginesControlsService(s *Service) *ProjectsLocationsCollectionsEnginesControlsService { + rs := &ProjectsLocationsCollectionsEnginesControlsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsEnginesControlsService struct { + s *Service +} + func NewProjectsLocationsCollectionsEnginesConversationsService(s *Service) *ProjectsLocationsCollectionsEnginesConversationsService { rs := &ProjectsLocationsCollectionsEnginesConversationsService{s: s} return rs @@ -574,6 +598,7 @@ type ProjectsLocationsCollectionsOperationsService struct { func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataStoresService { rs := &ProjectsLocationsDataStoresService{s: s} rs.Branches = NewProjectsLocationsDataStoresBranchesService(s) + rs.Controls = NewProjectsLocationsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsDataStoresConversationsService(s) rs.Models = NewProjectsLocationsDataStoresModelsService(s) rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) @@ -591,6 +616,8 @@ type ProjectsLocationsDataStoresService struct { Branches *ProjectsLocationsDataStoresBranchesService + Controls *ProjectsLocationsDataStoresControlsService + Conversations *ProjectsLocationsDataStoresConversationsService Models *ProjectsLocationsDataStoresModelsService @@ -655,6 +682,15 @@ type ProjectsLocationsDataStoresBranchesOperationsService struct { s *Service } +func NewProjectsLocationsDataStoresControlsService(s *Service) *ProjectsLocationsDataStoresControlsService { + rs := &ProjectsLocationsDataStoresControlsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresControlsService struct { + s *Service +} + func NewProjectsLocationsDataStoresConversationsService(s *Service) *ProjectsLocationsDataStoresConversationsService { rs := &ProjectsLocationsDataStoresConversationsService{s: s} return rs @@ -1138,6 +1174,286 @@ func (s *GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse) MarshalJSON return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Condition: Defines circumstances to be checked +// before allowing a behavior +type GoogleCloudDiscoveryengineV1Condition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1ConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1ConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Condition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Condition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ConditionQueryTerm: Matcher for search request +// query +type GoogleCloudDiscoveryengineV1ConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ConditionQueryTerm + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1ConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1Control: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1Control struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1ControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1Condition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1ControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1ControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1ControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Control) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Control + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlBoostAction: Adjusts order of products in +// returned list. +type GoogleCloudDiscoveryengineV1ControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1ControlFilterAction: Specified which products +// may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1ControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlRedirectAction: Redirects a shopper to +// the provided URI. +type GoogleCloudDiscoveryengineV1ControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlSynonymsAction: Creates a set of terms +// that will act as synonyms of one another. Example: "happy" will also be +// considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1ControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CreateDataStoreMetadata: Metadata related to the // progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -1781,9 +2097,8 @@ func (s *GoogleCloudDiscoveryengineV1EngineChatEngineMetadata) MarshalJSON() ([] // GoogleCloudDiscoveryengineV1EngineCommonConfig: Common configurations for an // Engine. type GoogleCloudDiscoveryengineV1EngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -2049,6 +2364,92 @@ func (s *GoogleCloudDiscoveryengineV1ImportUserEventsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Project: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1Project struct { + // CreateTime: Output only. The timestamp when this project is created. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1ProjectServiceTerms `json:"serviceTermsMap,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Project) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Project + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ProjectServiceTerms: Metadata about the terms of +// service. +type GoogleCloudDiscoveryengineV1ProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ProvisionProjectMetadata: Metadata associated +// with a project provision operation. +type GoogleCloudDiscoveryengineV1ProvisionProjectMetadata struct { +} + // GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata: Metadata related to the // progress of the PurgeDocuments operation. This will be returned by the // google.longrunning.Operation.metadata field. @@ -2610,6 +3011,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec str // skip generating answers for adversarial queries and return fallback messages // instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. If this field is set to `false`, all search results are used + // regardless of relevance to generate answers. If set to `true` or unset, the + // behavior will be determined automatically by the service. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,omitempty"` // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries that // are not answer-seeking. The default value is `false`. Google employs // search-query classification to detect answer-seeking queries. No answer is @@ -2849,6 +3255,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams s BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // CustomFineTuningSpec: Custom fine tuning configs. CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. Filter expression is case-sensitive. This will be used to filter @@ -3249,6 +3660,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata s Document string `json:"document,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -3278,6 +3692,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo st ChunkContents []*GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` // Document: Document resource name. Document string `json:"document,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -4020,9 +4437,9 @@ type GoogleCloudDiscoveryengineV1alphaChunk struct { Name string `json:"name,omitempty"` // PageSpan: Page span of the chunk. PageSpan *GoogleCloudDiscoveryengineV1alphaChunkPageSpan `json:"pageSpan,omitempty"` - // RelevanceScore: Represents the relevance score based on similarity. Higher - // score represents the chunk relevance. The score is in range [-1.0, 1.0]. - // Only populated on SearchService.SearchResponse + // RelevanceScore: Output only. Represents the relevance score based on + // similarity. Higher score indicates higher chunk relevance. The score is in + // range [-1.0, 1.0]. Only populated on SearchService.SearchResponse. RelevanceScore float64 `json:"relevanceScore,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -4272,6 +4689,289 @@ func (s *GoogleCloudDiscoveryengineV1alphaCompletionInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1alphaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1alphaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1alphaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCondition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1alphaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConditionQueryTerm + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1alphaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControl: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1alphaControl struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1alphaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1alphaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1alphaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1alphaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1alphaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControl + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1alphaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1alphaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1alphaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1alphaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaConversation: External conversation proto // definition. type GoogleCloudDiscoveryengineV1alphaConversation struct { @@ -4688,14 +5388,15 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // `TRAINING_FAILED`). // // Possible values: - // "MODEL_STATE_UNSPECIFIED" + // "MODEL_STATE_UNSPECIFIED" - Default value. // "TRAINING_PAUSED" - The model is in a paused training state. // "TRAINING" - The model is currently training. // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. - ModelState string `json:"modelState,omitempty"` - ModelVersion int64 `json:"modelVersion,omitempty,string"` + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: // `projects/{project_number}/locations/{location}/collections/{collection}/data // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be @@ -5610,9 +6311,8 @@ func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON( // GoogleCloudDiscoveryengineV1alphaEngineCommonConfig: Common configurations // for an Engine. type GoogleCloudDiscoveryengineV1alphaEngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -6088,6 +6788,7 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { // "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED" - Value used when unset. // "METATAGS" - Retrieve value from meta tag. // "PAGEMAP" - Retrieve value from page map. + // "SCHEMA_ORG" - Retrieve value from schema.org data. AdvancedSiteSearchDataSources []string `json:"advancedSiteSearchDataSources,omitempty"` // CompletableOption: If completable_option is COMPLETABLE_ENABLED, field // values are directly used and returned as suggestions for Autocomplete in @@ -6196,6 +6897,15 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema field. // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema field. RetrievableOption string `json:"retrievableOption,omitempty"` + // SchemaOrgPaths: Field paths for indexing custom attribute from schema.org + // data. More details of schema.org and its defined types can be found at + // schema.org (https://schema.org). It is only used on advanced site search + // schema. Currently only support full path from root. The full path to a field + // is constructed by concatenating field names, starting from `_root`, with a + // period `.` as the delimiter. Examples: * Publish date of the root: + // _root.datePublished * Publish date of the reviews: + // _root.review.datePublished + SchemaOrgPaths []string `json:"schemaOrgPaths,omitempty"` // SearchableOption: If searchable_option is SEARCHABLE_ENABLED, field values // are searchable by text queries in SearchService.Search. If // SEARCHABLE_ENABLED but field type is numerical, field values will not be @@ -6920,6 +7630,34 @@ func (s *GoogleCloudDiscoveryengineV1alphaListChunksResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListControlsResponse: Response for +// ListControls method. +type GoogleCloudDiscoveryengineV1alphaListControlsResponse struct { + // Controls: All the Controls for a given data store. + Controls []*GoogleCloudDiscoveryengineV1alphaControl `json:"controls,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Controls") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Controls") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaListControlsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListControlsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListConversationsResponse: Response for // ListConversations method. type GoogleCloudDiscoveryengineV1alphaListConversationsResponse struct { @@ -7806,6 +8544,19 @@ type GoogleCloudDiscoveryengineV1alphaRankRequest struct { // TopN: The number of results to return. If this is unset or no bigger than // zero, returns all results. TopN int64 `json:"topN,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. // "IgnoreRecordDetailsInResponse") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -8726,10 +9477,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // there will be no extractive answer in the search response. ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` // SearchResultMode: Specifies the search result mode. If unspecified, the - // search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults - // to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // search result mode defaults to `DOCUMENTS`. // // Possible values: // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. @@ -10716,6 +11464,13 @@ type GoogleCloudDiscoveryengineV1alphaUserEvent struct { // event. This field should be set for `search` event when autocomplete // function is enabled and the user clicks a suggestion for search. CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` + // DataStore: The DataStore resource full name, of the form + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. Optional. Only required for user events whose data + // store can't by determined by UserEvent.engine or UserEvent.documents. If + // data store is set in the parent of write/import/collect user event requests, + // this field can be omitted. + DataStore string `json:"dataStore,omitempty"` // DirectUserRequest: Should set to true if the request is made directly from // the end user, in which case the UserEvent.user_info.user_agent can be // populated from the HTTP request. This flag should be set only if the API @@ -10733,6 +11488,11 @@ type GoogleCloudDiscoveryengineV1alphaUserEvent struct { // for the same query, a new `search` event with different UserEvent.documents // is desired. Documents []*GoogleCloudDiscoveryengineV1alphaDocumentInfo `json:"documents,omitempty"` + // Engine: The Engine resource name, in the form of + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}`. Optional. Only required for Engine produced user events. For + // example, user events from blended search. + Engine string `json:"engine,omitempty"` // EventTime: Only required for UserEventService.ImportUserEvents method. // Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` @@ -10905,6 +11665,286 @@ func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) Marshal return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1betaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCondition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1betaControl struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControl + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata: Metadata related to // the progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -11023,14 +12063,15 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // `TRAINING_FAILED`). // // Possible values: - // "MODEL_STATE_UNSPECIFIED" + // "MODEL_STATE_UNSPECIFIED" - Default value. // "TRAINING_PAUSED" - The model is in a paused training state. // "TRAINING" - The model is currently training. // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. - ModelState string `json:"modelState,omitempty"` - ModelVersion int64 `json:"modelVersion,omitempty,string"` + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: // `projects/{project_number}/locations/{location}/collections/{collection}/data // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be @@ -11592,9 +12633,8 @@ func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() // GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations // for an Engine. type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -11883,6 +12923,92 @@ func (s *GoogleCloudDiscoveryengineV1betaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1betaProject struct { + // CreateTime: Output only. The timestamp when this project is created. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProject + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the +// terms of service. +type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata +// associated with a project provision operation. +type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { +} + // GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to // the progress of the PurgeDocuments operation. This will be returned by the // google.longrunning.Operation.metadata field. @@ -14139,7 +15265,7 @@ func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *Pro } // Filter sets the optional parameter "filter": Filter by solution type . For -// example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { c.urlParams_.Set("filter", filter) return c @@ -16216,6 +17342,597 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } +type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. +// +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Control. +// +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresControlsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Controls by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { s *Service name string @@ -22164,6 +23881,14 @@ func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent s return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -23150,6 +24875,597 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO return ret, nil } +type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("controlId", controlId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. +// +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesControlsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Control. +// +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsEnginesControlsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Controls by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { s *Service name string @@ -26532,7 +28848,7 @@ func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocati } // Filter sets the optional parameter "filter": Filter by solution type . For -// example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("filter", filter) return c @@ -27867,7 +30183,494 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall 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 Chunk, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`. If +// the caller does not have permission to access the Chunk, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. If the +// requested Chunk does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("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.documents.chunks.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaChunk.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaChunk{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Chunks. +// +// - parent: The parent document resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to list Chunks under this document, regardless of +// whether or not this document exists, a `PERMISSION_DENIED` error is +// returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of Chunks to +// return. If unspecified, defaults to 100. The maximum allowed value is 1000. +// Values above 1000 will be coerced to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListChunksResponse.next_page_token, received from a previous +// ChunkService.ListChunks call. Provide this to retrieve the subsequent page. +// When paginating, all other parameters provided to ChunkService.ListChunks +// must match the call that provided the page token. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") + urls += "?" + 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.chunks.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type 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 +// details. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + 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. +// Any non-2xx status code is 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 +} + +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27876,24 +30679,40 @@ type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { header_ http.Header } -// Get: Gets a Document. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Full resource name of Chunk, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}`. If -// the caller does not have permission to access the Chunk, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. If the -// requested Chunk does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The 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 // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27901,27 +30720,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ... // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27929,7 +30748,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27942,13 +30761,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaChunk.ServerResponse.Header or (if a +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, 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 { @@ -27967,7 +30786,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaChunk{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27980,91 +30799,94 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// List: Gets a list of Chunks. -// -// - parent: The parent document resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to list Chunks under this document, regardless of -// whether or not this document exists, a `PERMISSION_DENIED` error is -// returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +type ProjectsLocationsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": Maximum number of Chunks to -// return. If unspecified, defaults to 100. The maximum allowed value is 1000. -// Values above 1000 will be coerced to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. +// +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsCreateCall { + c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListChunksResponse.next_page_token, received from a previous -// ChunkService.ListChunks call. Provide this to retrieve the subsequent page. -// When paginating, all other parameters provided to ChunkService.ListChunks -// must match the call that provided the page token. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { - c.urlParams_.Set("pageToken", pageToken) +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/controls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -28075,13 +30897,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28100,7 +30922,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28113,89 +30935,57 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { + c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -28206,13 +30996,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28244,7 +31034,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28253,13 +31043,13 @@ type ProjectsLocationsDataStoresBranchesOperationsGetCall 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 Control. // -// - 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 Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { + c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28267,7 +31057,7 @@ func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28275,27 +31065,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsGetCall) 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 *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28316,13 +31106,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28341,7 +31131,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28354,41 +31144,45 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresControlsListCall 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 Controls by their parent DataStore. // -// - 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 +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { + c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28396,7 +31190,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28404,27 +31198,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28432,7 +31226,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/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28440,18 +31234,18 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1alphaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28470,7 +31264,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28486,7 +31280,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -28504,6 +31298,119 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx contex } } +type ProjectsLocationsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1alphacontrol *GoogleCloudDiscoveryengineV1alphaControl) *ProjectsLocationsDataStoresControlsPatchCall { + c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphacontrol = googleclouddiscoveryenginev1alphacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacontrol) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.controls.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresConversationsConverseCall struct { s *Service name string @@ -33302,6 +36209,14 @@ func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, goog return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -34096,6 +37011,14 @@ func (r *ProjectsLocationsUserEventsService) Write(parent string, googleclouddis return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index c9d8f258f87..97e936c5e6a 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -106,6 +106,36 @@ "protocol": "rest", "resources": { "projects": { + "methods": { + "provision": { + "description": "Provisions the project resource. During the process, related systems will get prepared and initialized. Caller must read the [Terms for data use](https://cloud.google.com/retail/data-use-terms), and optionally specify in request to provide consent to that service terms.", + "flatPath": "v1beta/projects/{projectsId}:provision", + "httpMethod": "POST", + "id": "discoveryengine.projects.provision", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Full resource name of a Project, such as `projects/{project_id_or_number}`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}:provision", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaProvisionProjectRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "locations": { "resources": { @@ -355,7 +385,7 @@ ], "parameters": { "filter": { - "description": "Filter by solution type . For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "description": "Filter by solution type . For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`", "location": "query", "type": "string" }, @@ -770,6 +800,168 @@ } } }, + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "conversations": { "methods": { "converse": { @@ -2353,6 +2545,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1beta/{+parent}/userEvents:write", @@ -2616,77 +2813,54 @@ } }, "resources": { - "conversations": { + "controls": { "methods": { - "converse": { - "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}`. 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}:converse", - "request": { - "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" - }, - "response": { - "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, "create": { - "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", + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls", "httpMethod": "POST", - "id": "discoveryengine.projects.locations.collections.engines.conversations.create", + "id": "discoveryengine.projects.locations.collections.engines.controls.create", "parameterOrder": [ "parent" ], "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "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. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta/{+parent}/conversations", + "path": "v1beta/{+parent}/controls", "request": { - "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + "$ref": "GoogleCloudDiscoveryengineV1betaControl" }, "response": { - "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + "$ref": "GoogleCloudDiscoveryengineV1betaControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "delete": { - "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}", + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", "httpMethod": "DELETE", - "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", + "id": "discoveryengine.projects.locations.collections.engines.controls.delete", "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 Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, "type": "string" } @@ -2700,94 +2874,89 @@ ] }, "get": { - "description": "Gets a Conversation.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + "description": "Gets a Control.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.engines.conversations.get", + "id": "discoveryengine.projects.locations.collections.engines.controls.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}`", + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta/{+name}", "response": { - "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + "$ref": "GoogleCloudDiscoveryengineV1betaControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists all Conversations by their parent DataStore.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls", "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.engines.conversations.list", + "id": "discoveryengine.projects.locations.collections.engines.controls.list", "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\"", + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", "location": "query", "type": "string" }, "pageSize": { - "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "description": "Optional. 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.", + "description": "Optional. A page token, received from a previous `ListControls` 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. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta/{+parent}/conversations", + "path": "v1beta/{+parent}/controls", "response": { - "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" + "$ref": "GoogleCloudDiscoveryengineV1betaListControlsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "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}", + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/controls/{controlsId}", "httpMethod": "PATCH", - "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", + "id": "discoveryengine.projects.locations.collections.engines.controls.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.", + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/controls/[^/]+$", "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.", + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", "format": "google-fieldmask", "location": "query", "type": "string" @@ -2795,10 +2964,10 @@ }, "path": "v1beta/{+name}", "request": { - "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + "$ref": "GoogleCloudDiscoveryengineV1betaControl" }, "response": { - "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + "$ref": "GoogleCloudDiscoveryengineV1betaControl" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" @@ -2806,58 +2975,248 @@ } } }, - "operations": { + "conversations": { "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.engines.operations.get", + "converse": { + "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": "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/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/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" ] }, - "list": { - "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.engines.operations.list", + "create": { + "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", "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/[^/]+/collections/[^/]+/engines/[^/]+$", "required": true, "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", + } + }, + "path": "v1beta/{+parent}/conversations", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "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", + "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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "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", + "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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "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.conversations.list", + "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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/conversations", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "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": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*` or `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.", + "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" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", + "httpMethod": "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's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", "type": "integer" }, "pageToken": { @@ -3496,7 +3855,7 @@ ], "parameters": { "filter": { - "description": "Filter by solution type . For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + "description": "Filter by solution type . For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`", "location": "query", "type": "string" }, @@ -3883,6 +4242,168 @@ } } }, + "controls": { + "methods": { + "create": { + "description": "Creates a Control. By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.controls.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "controlId": { + "description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value must be within 1-63 characters. Valid characters are /a-z-_/.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/controls", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.controls.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Control.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.controls.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Controls by their parent DataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.controls.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. Currently this field is unsupported.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListControls` 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_id}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/controls", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListControlsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Control. Control action type cannot be changed. If the Control to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/controls/{controlsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.controls.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/controls/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name * Control.solution_type If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "conversations": { "methods": { "converse": { @@ -5159,6 +5680,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1beta/{+parent}/userEvents:write", @@ -5327,6 +5853,11 @@ "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "writeAsync": { + "description": "If set to true, the user event is written asynchronously after validation, and the API responds without waiting for the write.", + "location": "query", + "type": "boolean" } }, "path": "v1beta/{+parent}/userEvents:write", @@ -5417,7 +5948,7 @@ } } }, - "revision": "20240517", + "revision": "20240526", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5544,53 +6075,247 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingServiceContext": { - "description": "Describes a running service that sends errors.", - "id": "GoogleCloudDiscoveryengineLoggingServiceContext", + "GoogleCloudDiscoveryengineLoggingServiceContext": { + "description": "Describes a running service that sends errors.", + "id": "GoogleCloudDiscoveryengineLoggingServiceContext", + "properties": { + "service": { + "description": "An identifier of the service—for example, `discoveryengine.googleapis.com`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineLoggingSourceLocation": { + "description": "Indicates a location in the source code of the service for which errors are reported.", + "id": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "properties": { + "functionName": { + "description": "Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse", + "properties": { + "targetSites": { + "description": "TargetSites created.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSite" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Condition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1Condition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1ConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1ConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1ConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Control": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1Control", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1Condition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1ControlBoostAction", "properties": { - "service": { - "description": "An identifier of the service—for example, `discoveryengine.googleapis.com`.", + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineLoggingSourceLocation": { - "description": "Indicates a location in the source code of the service for which errors are reported.", - "id": "GoogleCloudDiscoveryengineLoggingSourceLocation", + "GoogleCloudDiscoveryengineV1ControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1ControlFilterAction", "properties": { - "functionName": { - "description": "Human-readable name of a function or method—for example, `google.cloud.discoveryengine.v1alpha.RecommendationService.Recommend`.", + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.BatchCreateTargetSites operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1ControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1ControlRedirectAction", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse", + "GoogleCloudDiscoveryengineV1ControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1ControlSynonymsAction", "properties": { - "targetSites": { - "description": "TargetSites created.", + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSite" + "type": "string" }, "type": "array" } @@ -6067,7 +6792,7 @@ "id": "GoogleCloudDiscoveryengineV1EngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -6266,6 +6991,85 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1Project": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1Project", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1ProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1ProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1ProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata", @@ -6776,6 +7580,14 @@ "description": "Page identifier.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -6802,6 +7614,14 @@ "description": "Document resource name.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -7004,6 +7824,200 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1alphaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1alphaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1alphaConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1alphaControl", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1alphaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1alphaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1alphaControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1alphaControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", @@ -7096,7 +8110,7 @@ "TRAINING_FAILED" ], "enumDescriptions": [ - "", + "Default value.", "The model is in a paused training state.", "The model is currently training.", "The model has successfully completed training.", @@ -7106,6 +8120,7 @@ "type": "string" }, "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, @@ -7586,7 +8601,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -7772,12 +8787,14 @@ "enum": [ "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED", "METATAGS", - "PAGEMAP" + "PAGEMAP", + "SCHEMA_ORG" ], "enumDescriptions": [ "Value used when unset.", "Retrieve value from meta tag.", - "Retrieve value from page map." + "Retrieve value from page map.", + "Retrieve value from schema.org data." ], "type": "string" }, @@ -7887,6 +8904,13 @@ ], "type": "string" }, + "schemaOrgPaths": { + "description": "Field paths for indexing custom attribute from schema.org data. More details of schema.org and its defined types can be found at [schema.org](https://schema.org). It is only used on advanced site search schema. Currently only support full path from root. The full path to a field is constructed by concatenating field names, starting from `_root`, with a period `.` as the delimiter. Examples: * Publish date of the root: _root.datePublished * Publish date of the reviews: _root.review.datePublished", + "items": { + "type": "string" + }, + "type": "array" + }, "searchableOption": { "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", "enum": [ @@ -8949,6 +9973,10 @@ "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", "type": "boolean" }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true` or unset, the behavior will be determined automatically by the service.", + "type": "boolean" + }, "ignoreNonAnswerSeekingQuery": { "description": "Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", "type": "boolean" @@ -9090,6 +10118,13 @@ "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", "description": "Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" }, + "dataStoreSpecs": { + "description": "Specs defining dataStores to filter on in a search call and configurations for those dataStores. This is only considered for engines with multiple dataStores use case. For single dataStore within an engine, they should use the specs at the top level.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec" + }, + "type": "array" + }, "filter": { "description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the documents being filtered. Filter expression is case-sensitive. This will be used to filter search results which may affect the Answer response. If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in Vertex AI Search is done by mapping the LHS filter key to a key property defined in the Vertex AI Search backend -- this mapping is defined by the customer in their schema. For example a media customers might have a field 'name' in their schema. In this case the filter would look like this: filter --\u003e name:'ANY(\"king kong\")' For more information about filtering including syntax and filter operators, see [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)", "type": "string" @@ -9344,6 +10379,14 @@ "description": "Page identifier.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -9370,6 +10413,14 @@ "description": "Document resource name.", "type": "string" }, + "structData": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured JSON metadata for the document. It is populated from the struct data from the Chunk in search result.", + "type": "object" + }, "title": { "description": "Title.", "type": "string" @@ -9957,6 +11008,200 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaCondition": { + "description": "Defines circumstances to be checked before allowing a behavior", + "id": "GoogleCloudDiscoveryengineV1betaCondition", + "properties": { + "activeTimeRange": { + "description": "Range of time(s) specifying when condition is active. Maximum of 10 time ranges.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionTimeRange" + }, + "type": "array" + }, + "queryTerms": { + "description": "Search only A list of terms to match the query on. Maximum of 10 query terms.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaConditionQueryTerm": { + "description": "Matcher for search request query", + "id": "GoogleCloudDiscoveryengineV1betaConditionQueryTerm", + "properties": { + "fullMatch": { + "description": "Whether the search query needs to exactly match the query term.", + "type": "boolean" + }, + "value": { + "description": "The specific query value to match against Must be lowercase, must be UTF-8. Can have at most 3 space separated terms if full_match is true. Cannot be an empty string. Maximum length of 5000 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaConditionTimeRange": { + "description": "Used for time-dependent conditions.", + "id": "GoogleCloudDiscoveryengineV1betaConditionTimeRange", + "properties": { + "endTime": { + "description": "End of time range. Range is inclusive. Must be in the future.", + "format": "google-datetime", + "type": "string" + }, + "startTime": { + "description": "Start of time range. Range is inclusive.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControl": { + "description": "Defines a conditioned behavior to employ during serving. Must be attached to a ServingConfig to be considered at serving time. Permitted actions dependent on `SolutionType`.", + "id": "GoogleCloudDiscoveryengineV1betaControl", + "properties": { + "associatedServingConfigIds": { + "description": "Output only. List of all ServingConfig ids this control is attached to. May take up to 10 minutes to update after changes.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "boostAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "description": "Defines a boost-type control" + }, + "conditions": { + "description": "Determines when the associated action will trigger. Omit to always apply the action. Currently only a single condition may be specified. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaCondition" + }, + "type": "array" + }, + "displayName": { + "description": "Required. Human readable name. The identifier used in UI views. Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + }, + "filterAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "description": "Defines a filter-type control Currently not supported by Recommendation" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/*/locations/global/dataStore/*/controls/*`", + "type": "string" + }, + "redirectAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "description": "Defines a redirect-type control." + }, + "solutionType": { + "description": "Required. Immutable. What solution the control belongs to. Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT error is thrown.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "description": "Treats a group of terms as synonyms of one another." + }, + "useCases": { + "description": "Specifies the use case for the control. Affects what condition fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only allow one use case per control. Must be set when solution_type is SolutionType.SOLUTION_TYPE_SEARCH.", + "items": { + "enum": [ + "SEARCH_USE_CASE_UNSPECIFIED", + "SEARCH_USE_CASE_SEARCH", + "SEARCH_USE_CASE_BROWSE" + ], + "enumDescriptions": [ + "Value used when unset. Will not occur in CSS.", + "Search use case. Expects the traffic has a non-empty query.", + "Browse use case. Expects the traffic has an empty query." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlBoostAction": { + "description": "Adjusts order of products in returned list.", + "id": "GoogleCloudDiscoveryengineV1betaControlBoostAction", + "properties": { + "boost": { + "description": "Required. Strength of the boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0 (No-op).", + "format": "float", + "type": "number" + }, + "dataStore": { + "description": "Required. Specifies which data store's documents can be boosted by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. Specifies which products to apply the boost to. If no filter is provided all products will be boosted (No-op). Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlFilterAction": { + "description": "Specified which products may be included in results. Uses same filter as boost.", + "id": "GoogleCloudDiscoveryengineV1betaControlFilterAction", + "properties": { + "dataStore": { + "description": "Required. Specifies which data store's documents can be filtered by this control. Full data store name e.g. projects/123/locations/global/collections/default_collection/dataStores/default_data_store", + "type": "string" + }, + "filter": { + "description": "Required. A filter to apply on the matching condition results. Required Syntax documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlRedirectAction": { + "description": "Redirects a shopper to the provided URI.", + "id": "GoogleCloudDiscoveryengineV1betaControlRedirectAction", + "properties": { + "redirectUri": { + "description": "Required. The URI to which the shopper will be redirected. Required. URI must have length equal or less than 2000 characters. Otherwise an INVALID ARGUMENT error is thrown.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaControlSynonymsAction": { + "description": "Creates a set of terms that will act as synonyms of one another. Example: \"happy\" will also be considered as \"glad\", \"glad\" will also be considered as \"happy\".", + "id": "GoogleCloudDiscoveryengineV1betaControlSynonymsAction", + "properties": { + "synonyms": { + "description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaConversation": { "description": "External conversation proto definition.", "id": "GoogleCloudDiscoveryengineV1betaConversation", @@ -10244,7 +11489,7 @@ "TRAINING_FAILED" ], "enumDescriptions": [ - "", + "Default value.", "The model is in a paused training state.", "The model is currently training.", "The model has successfully completed training.", @@ -10254,6 +11499,7 @@ "type": "string" }, "modelVersion": { + "description": "The version of the model.", "format": "int64", "type": "string" }, @@ -10814,7 +12060,7 @@ "id": "GoogleCloudDiscoveryengineV1betaEngineCommonConfig", "properties": { "companyName": { - "description": "Immutable. The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", + "description": "The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.", "type": "string" } }, @@ -11314,6 +12560,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaListControlsResponse": { + "description": "Response for ListControls method.", + "id": "GoogleCloudDiscoveryengineV1betaListControlsResponse", + "properties": { + "controls": { + "description": "All the Controls for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaControl" + }, + "type": "array" + }, + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaListConversationsResponse": { "description": "Response for ListConversations method.", "id": "GoogleCloudDiscoveryengineV1betaListConversationsResponse", @@ -11548,6 +12812,100 @@ "properties": {}, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaProject": { + "description": "Metadata and configurations for a Google Cloud project in the service.", + "id": "GoogleCloudDiscoveryengineV1betaProject", + "properties": { + "createTime": { + "description": "Output only. The timestamp when this project is created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. Full resource name of the project, for example `projects/{project_number}`. Note that when making requests, project number and project id are both acceptable, but the server will always respond in project number.", + "readOnly": true, + "type": "string" + }, + "provisionCompletionTime": { + "description": "Output only. The timestamp when this project is successfully provisioned. Empty value means this project is still provisioning and is not ready for use.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "serviceTermsMap": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms" + }, + "description": "Output only. A map of terms of services. The key is the `id` of ServiceTerms.", + "readOnly": true, + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProjectServiceTerms": { + "description": "Metadata about the terms of service.", + "id": "GoogleCloudDiscoveryengineV1betaProjectServiceTerms", + "properties": { + "acceptTime": { + "description": "The last time when the project agreed to the terms of service.", + "format": "google-datetime", + "type": "string" + }, + "declineTime": { + "description": "The last time when the project declined or revoked the agreement to terms of service.", + "format": "google-datetime", + "type": "string" + }, + "id": { + "description": "The unique identifier of this terms of service. Available terms: * `GA_DATA_USE_TERMS`: [Terms for data use](https://cloud.google.com/retail/data-use-terms). When using this as `id`, the acceptable version to provide is `2022-11-23`.", + "type": "string" + }, + "state": { + "description": "Whether the project has accepted/rejected the service terms or it is still pending.", + "enum": [ + "STATE_UNSPECIFIED", + "TERMS_ACCEPTED", + "TERMS_PENDING", + "TERMS_DECLINED" + ], + "enumDescriptions": [ + "The default value of the enum. This value is not actually used.", + "The project has given consent to the terms of service.", + "The project is pending to review and accept the terms of service.", + "The project has declined or revoked the agreement to terms of service." + ], + "type": "string" + }, + "version": { + "description": "The version string of the terms of service. For acceptable values, see the comments for id above.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata": { + "description": "Metadata associated with a project provision operation.", + "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaProvisionProjectRequest": { + "description": "Request for ProjectService.ProvisionProject method.", + "id": "GoogleCloudDiscoveryengineV1betaProvisionProjectRequest", + "properties": { + "acceptDataUseTerms": { + "description": "Required. Set to `true` to specify that caller has read and would like to give consent to the [Terms for data use](https://cloud.google.com/retail/data-use-terms).", + "type": "boolean" + }, + "dataUseTermsVersion": { + "description": "Required. The version of the [Terms for data use](https://cloud.google.com/retail/data-use-terms) that caller has read and would like to give consent to. Acceptable version is `2022-11-23`, and this may change over time.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata": { "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata", @@ -11698,6 +13056,13 @@ "description": "The number of results to return. If this is unset or no bigger than zero, returns all results.", "format": "int32", "type": "integer" + }, + "userLabels": { + "additionalProperties": { + "type": "string" + }, + "description": "The user labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", + "type": "object" } }, "type": "object" @@ -13468,6 +14833,10 @@ "$ref": "GoogleCloudDiscoveryengineV1betaCompletionInfo", "description": "CompletionService.CompleteQuery details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." }, + "dataStore": { + "description": "The DataStore resource full name, of the form `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. Optional. Only required for user events whose data store can't by determined by UserEvent.engine or UserEvent.documents. If data store is set in the parent of write/import/collect user event requests, this field can be omitted.", + "type": "string" + }, "directUserRequest": { "description": "Should set to true if the request is made directly from the end user, in which case the UserEvent.user_info.user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", "type": "boolean" @@ -13479,6 +14848,10 @@ }, "type": "array" }, + "engine": { + "description": "The Engine resource name, in the form of `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. Optional. Only required for Engine produced user events. For example, user events from blended search.", + "type": "string" + }, "eventTime": { "description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", "format": "google-datetime", diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index bb70c0adfb6..3644e566b16 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -241,6 +241,7 @@ type ProjectsLocationsCollectionsDataConnectorOperationsService struct { func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocationsCollectionsDataStoresService { rs := &ProjectsLocationsCollectionsDataStoresService{s: s} rs.Branches = NewProjectsLocationsCollectionsDataStoresBranchesService(s) + rs.Controls = NewProjectsLocationsCollectionsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsDataStoresConversationsService(s) rs.CustomModels = NewProjectsLocationsCollectionsDataStoresCustomModelsService(s) rs.Models = NewProjectsLocationsCollectionsDataStoresModelsService(s) @@ -259,6 +260,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { Branches *ProjectsLocationsCollectionsDataStoresBranchesService + Controls *ProjectsLocationsCollectionsDataStoresControlsService + Conversations *ProjectsLocationsCollectionsDataStoresConversationsService CustomModels *ProjectsLocationsCollectionsDataStoresCustomModelsService @@ -313,6 +316,15 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresControlsService(s *Service) *ProjectsLocationsCollectionsDataStoresControlsService { + rs := &ProjectsLocationsCollectionsDataStoresControlsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresControlsService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresConversationsService(s *Service) *ProjectsLocationsCollectionsDataStoresConversationsService { rs := &ProjectsLocationsCollectionsDataStoresConversationsService{s: s} return rs @@ -477,6 +489,7 @@ type ProjectsLocationsCollectionsDataStoresUserEventsService struct { func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocationsCollectionsEnginesService { rs := &ProjectsLocationsCollectionsEnginesService{s: s} + rs.Controls = NewProjectsLocationsCollectionsEnginesControlsService(s) rs.Conversations = NewProjectsLocationsCollectionsEnginesConversationsService(s) rs.Operations = NewProjectsLocationsCollectionsEnginesOperationsService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsEnginesServingConfigsService(s) @@ -487,6 +500,8 @@ func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocation type ProjectsLocationsCollectionsEnginesService struct { s *Service + Controls *ProjectsLocationsCollectionsEnginesControlsService + Conversations *ProjectsLocationsCollectionsEnginesConversationsService Operations *ProjectsLocationsCollectionsEnginesOperationsService @@ -496,6 +511,15 @@ type ProjectsLocationsCollectionsEnginesService struct { Sessions *ProjectsLocationsCollectionsEnginesSessionsService } +func NewProjectsLocationsCollectionsEnginesControlsService(s *Service) *ProjectsLocationsCollectionsEnginesControlsService { + rs := &ProjectsLocationsCollectionsEnginesControlsService{s: s} + return rs +} + +type ProjectsLocationsCollectionsEnginesControlsService struct { + s *Service +} + func NewProjectsLocationsCollectionsEnginesConversationsService(s *Service) *ProjectsLocationsCollectionsEnginesConversationsService { rs := &ProjectsLocationsCollectionsEnginesConversationsService{s: s} return rs @@ -556,6 +580,7 @@ type ProjectsLocationsCollectionsOperationsService struct { func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataStoresService { rs := &ProjectsLocationsDataStoresService{s: s} rs.Branches = NewProjectsLocationsDataStoresBranchesService(s) + rs.Controls = NewProjectsLocationsDataStoresControlsService(s) rs.Conversations = NewProjectsLocationsDataStoresConversationsService(s) rs.Models = NewProjectsLocationsDataStoresModelsService(s) rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) @@ -573,6 +598,8 @@ type ProjectsLocationsDataStoresService struct { Branches *ProjectsLocationsDataStoresBranchesService + Controls *ProjectsLocationsDataStoresControlsService + Conversations *ProjectsLocationsDataStoresConversationsService Models *ProjectsLocationsDataStoresModelsService @@ -625,6 +652,15 @@ type ProjectsLocationsDataStoresBranchesOperationsService struct { s *Service } +func NewProjectsLocationsDataStoresControlsService(s *Service) *ProjectsLocationsDataStoresControlsService { + rs := &ProjectsLocationsDataStoresControlsService{s: s} + return rs +} + +type ProjectsLocationsDataStoresControlsService struct { + s *Service +} + func NewProjectsLocationsDataStoresConversationsService(s *Service) *ProjectsLocationsDataStoresConversationsService { rs := &ProjectsLocationsDataStoresConversationsService{s: s} return rs @@ -1066,6 +1102,286 @@ func (s *GoogleCloudDiscoveryengineV1BatchCreateTargetSitesResponse) MarshalJSON return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Condition: Defines circumstances to be checked +// before allowing a behavior +type GoogleCloudDiscoveryengineV1Condition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1ConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1ConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Condition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Condition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ConditionQueryTerm: Matcher for search request +// query +type GoogleCloudDiscoveryengineV1ConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ConditionQueryTerm + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1ConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1Control: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1Control struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1ControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1Condition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1ControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1ControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1ControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Control) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Control + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlBoostAction: Adjusts order of products in +// returned list. +type GoogleCloudDiscoveryengineV1ControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1ControlFilterAction: Specified which products +// may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1ControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlRedirectAction: Redirects a shopper to +// the provided URI. +type GoogleCloudDiscoveryengineV1ControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ControlSynonymsAction: Creates a set of terms +// that will act as synonyms of one another. Example: "happy" will also be +// considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1ControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1CreateDataStoreMetadata: Metadata related to the // progress of the DataStoreService.CreateDataStore operation. This will be // returned by the google.longrunning.Operation.metadata field. @@ -1709,9 +2025,8 @@ func (s *GoogleCloudDiscoveryengineV1EngineChatEngineMetadata) MarshalJSON() ([] // GoogleCloudDiscoveryengineV1EngineCommonConfig: Common configurations for an // Engine. type GoogleCloudDiscoveryengineV1EngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -1977,6 +2292,92 @@ func (s *GoogleCloudDiscoveryengineV1ImportUserEventsResponse) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1Project: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1Project struct { + // CreateTime: Output only. The timestamp when this project is created. + CreateTime string `json:"createTime,omitempty"` + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1ProjectServiceTerms `json:"serviceTermsMap,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1Project) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1Project + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ProjectServiceTerms: Metadata about the terms of +// service. +type GoogleCloudDiscoveryengineV1ProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1ProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ProvisionProjectMetadata: Metadata associated +// with a project provision operation. +type GoogleCloudDiscoveryengineV1ProvisionProjectMetadata struct { +} + // GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata: Metadata related to the // progress of the PurgeDocuments operation. This will be returned by the // google.longrunning.Operation.metadata field. @@ -2591,6 +2992,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata s Document string `json:"document,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -2620,6 +3024,9 @@ type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo st ChunkContents []*GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` // Document: Document resource name. Document string `json:"document,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -2919,10 +3326,290 @@ func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) Marsha return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata: Metadata related -// to the progress of the DataStoreService.CreateDataStore operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { +// GoogleCloudDiscoveryengineV1alphaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1alphaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1alphaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1alphaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCondition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1alphaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConditionQueryTerm + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1alphaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConditionTimeRange + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControl: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1alphaControl struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1alphaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1alphaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1alphaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1alphaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1alphaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControl + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1alphaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1alphaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1alphaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1alphaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata: Metadata related +// to the progress of the DataStoreService.CreateDataStore operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` // UpdateTime: Operation last update time. If the operation is done, this is @@ -3037,14 +3724,15 @@ type GoogleCloudDiscoveryengineV1alphaCustomTuningModel struct { // `TRAINING_FAILED`). // // Possible values: - // "MODEL_STATE_UNSPECIFIED" + // "MODEL_STATE_UNSPECIFIED" - Default value. // "TRAINING_PAUSED" - The model is in a paused training state. // "TRAINING" - The model is currently training. // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. - ModelState string `json:"modelState,omitempty"` - ModelVersion int64 `json:"modelVersion,omitempty,string"` + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: // `projects/{project_number}/locations/{location}/collections/{collection}/data // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be @@ -3687,9 +4375,8 @@ func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON( // GoogleCloudDiscoveryengineV1alphaEngineCommonConfig: Common configurations // for an Engine. type GoogleCloudDiscoveryengineV1alphaEngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -3965,6 +4652,7 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { // "ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED" - Value used when unset. // "METATAGS" - Retrieve value from meta tag. // "PAGEMAP" - Retrieve value from page map. + // "SCHEMA_ORG" - Retrieve value from schema.org data. AdvancedSiteSearchDataSources []string `json:"advancedSiteSearchDataSources,omitempty"` // CompletableOption: If completable_option is COMPLETABLE_ENABLED, field // values are directly used and returned as suggestions for Autocomplete in @@ -4073,6 +4761,15 @@ type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema field. // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema field. RetrievableOption string `json:"retrievableOption,omitempty"` + // SchemaOrgPaths: Field paths for indexing custom attribute from schema.org + // data. More details of schema.org and its defined types can be found at + // schema.org (https://schema.org). It is only used on advanced site search + // schema. Currently only support full path from root. The full path to a field + // is constructed by concatenating field names, starting from `_root`, with a + // period `.` as the delimiter. Examples: * Publish date of the root: + // _root.datePublished * Publish date of the reviews: + // _root.review.datePublished + SchemaOrgPaths []string `json:"schemaOrgPaths,omitempty"` // SearchableOption: If searchable_option is SEARCHABLE_ENABLED, field values // are searchable by text queries in SearchService.Search. If // SEARCHABLE_ENABLED but field type is numerical, field values will not be @@ -5380,6 +6077,11 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec stru // skip generating answers for adversarial queries and return fallback messages // instead. IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. If this field is set to `false`, all search results are used + // regardless of relevance to generate answers. If set to `true` or unset, the + // behavior will be determined automatically by the service. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,omitempty"` // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries that // are not answer-seeking. The default value is `false`. Google employs // search-query classification to detect answer-seeking queries. No answer is @@ -5617,6 +6319,11 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams st // which may affect the answer query response. For more information on // boosting, see Boosting (https://cloud.google.com/retail/docs/boosting#boost) BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // DataStoreSpecs: Specs defining dataStores to filter on in a search call and + // configurations for those dataStores. This is only considered for engines + // with multiple dataStores use case. For single dataStore within an engine, + // they should use the specs at the top level. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. Filter expression is case-sensitive. This will be used to filter @@ -6003,6 +6710,9 @@ type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata st Document string `json:"document,omitempty"` // PageIdentifier: Page identifier. PageIdentifier string `json:"pageIdentifier,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -6032,6 +6742,9 @@ type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo str ChunkContents []*GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` // Document: Document resource name. Document string `json:"document,omitempty"` + // StructData: The structured JSON metadata for the document. It is populated + // from the struct data from the Chunk in search result. + StructData googleapi.RawMessage `json:"structData,omitempty"` // Title: Title. Title string `json:"title,omitempty"` // Uri: URI for the document. @@ -6882,117 +7595,400 @@ func (s *GoogleCloudDiscoveryengineV1betaCompletionInfo) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConversation: External conversation proto -// definition. -type GoogleCloudDiscoveryengineV1betaConversation struct { - // EndTime: Output only. The time the conversation finished. - EndTime string `json:"endTime,omitempty"` - // Messages: Conversation messages. - Messages []*GoogleCloudDiscoveryengineV1betaConversationMessage `json:"messages,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/global/collections/{collection}/dataStore/*/con - // versations/*` or - // `projects/{project}/locations/global/collections/{collection}/engines/*/conve - // rsations/*`. - Name string `json:"name,omitempty"` - // StartTime: Output only. The time the conversation started. - StartTime string `json:"startTime,omitempty"` - // State: The state of the Conversation. - // - // Possible values: - // "STATE_UNSPECIFIED" - Unknown. - // "IN_PROGRESS" - Conversation is currently open. - // "COMPLETED" - Conversation has been completed. - State string `json:"state,omitempty"` - // UserPseudoId: A unique identifier for tracking users. - UserPseudoId string `json:"userPseudoId,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaCondition: Defines circumstances to be +// checked before allowing a behavior +type GoogleCloudDiscoveryengineV1betaCondition struct { + // ActiveTimeRange: Range of time(s) specifying when condition is active. + // Maximum of 10 time ranges. + ActiveTimeRange []*GoogleCloudDiscoveryengineV1betaConditionTimeRange `json:"activeTimeRange,omitempty"` + // QueryTerms: Search only A list of terms to match the query on. Maximum of 10 + // query terms. + QueryTerms []*GoogleCloudDiscoveryengineV1betaConditionQueryTerm `json:"queryTerms,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveTimeRange") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "ActiveTimeRange") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConversation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversation +func (s *GoogleCloudDiscoveryengineV1betaCondition) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCondition return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConversationContext: Defines context of the -// conversation -type GoogleCloudDiscoveryengineV1betaConversationContext struct { - // ActiveDocument: The current active document the user opened. It contains the - // document resource reference. - ActiveDocument string `json:"activeDocument,omitempty"` - // ContextDocuments: The current list of documents the user is seeing. It - // contains the document resource references. - ContextDocuments []string `json:"contextDocuments,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveDocument") to +// GoogleCloudDiscoveryengineV1betaConditionQueryTerm: Matcher for search +// request query +type GoogleCloudDiscoveryengineV1betaConditionQueryTerm struct { + // FullMatch: Whether the search query needs to exactly match the query term. + FullMatch bool `json:"fullMatch,omitempty"` + // Value: The specific query value to match against Must be lowercase, must be + // UTF-8. Can have at most 3 space separated terms if full_match is true. + // Cannot be an empty string. Maximum length of 5000 characters. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "FullMatch") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveDocument") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "FullMatch") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConversationContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversationContext +func (s *GoogleCloudDiscoveryengineV1betaConditionQueryTerm) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionQueryTerm return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConversationMessage: Defines a conversation -// message. -type GoogleCloudDiscoveryengineV1betaConversationMessage struct { - // CreateTime: Output only. Message creation timestamp. - CreateTime string `json:"createTime,omitempty"` - // Reply: Search reply. - Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` - // UserInput: User text input. - UserInput *GoogleCloudDiscoveryengineV1betaTextInput `json:"userInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudDiscoveryengineV1betaConditionTimeRange: Used for time-dependent +// conditions. +type GoogleCloudDiscoveryengineV1betaConditionTimeRange struct { + // EndTime: End of time range. Range is inclusive. Must be in the future. + EndTime string `json:"endTime,omitempty"` + // StartTime: Start of time range. Range is inclusive. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API + // NullFields is a list of field names (e.g. "EndTime") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversationMessage +func (s *GoogleCloudDiscoveryengineV1betaConditionTimeRange) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConditionTimeRange return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConverseConversationRequest: Request message -// for ConversationalSearchService.ConverseConversation method. -type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { - // BoostSpec: Boost specification to boost certain documents in search results - // which may affect the converse response. For more information on boosting, - // see Boosting (https://cloud.google.com/retail/docs/boosting#boost) - BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // Conversation: The conversation to be used by auto session only. The name - // field will be ignored as we automatically assign new name for the - // conversation in auto session. - Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` - // Filter: The filter syntax consists of an expression language for +// GoogleCloudDiscoveryengineV1betaControl: Defines a conditioned behavior to +// employ during serving. Must be attached to a ServingConfig to be considered +// at serving time. Permitted actions dependent on `SolutionType`. +type GoogleCloudDiscoveryengineV1betaControl struct { + // AssociatedServingConfigIds: Output only. List of all ServingConfig ids this + // control is attached to. May take up to 10 minutes to update after changes. + AssociatedServingConfigIds []string `json:"associatedServingConfigIds,omitempty"` + // BoostAction: Defines a boost-type control + BoostAction *GoogleCloudDiscoveryengineV1betaControlBoostAction `json:"boostAction,omitempty"` + // Conditions: Determines when the associated action will trigger. Omit to + // always apply the action. Currently only a single condition may be specified. + // Otherwise an INVALID ARGUMENT error is thrown. + Conditions []*GoogleCloudDiscoveryengineV1betaCondition `json:"conditions,omitempty"` + // DisplayName: Required. Human readable name. The identifier used in UI views. + // Must be UTF-8 encoded string. Length limit is 128 characters. Otherwise an + // INVALID ARGUMENT error is thrown. + DisplayName string `json:"displayName,omitempty"` + // FilterAction: Defines a filter-type control Currently not supported by + // Recommendation + FilterAction *GoogleCloudDiscoveryengineV1betaControlFilterAction `json:"filterAction,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/*/locations/global/dataStore/*/controls/*` + Name string `json:"name,omitempty"` + // RedirectAction: Defines a redirect-type control. + RedirectAction *GoogleCloudDiscoveryengineV1betaControlRedirectAction `json:"redirectAction,omitempty"` + // SolutionType: Required. Immutable. What solution the control belongs to. + // Must be compatible with vertical of resource. Otherwise an INVALID ARGUMENT + // error is thrown. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative AI + // agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsAction: Treats a group of terms as synonyms of one another. + SynonymsAction *GoogleCloudDiscoveryengineV1betaControlSynonymsAction `json:"synonymsAction,omitempty"` + // UseCases: Specifies the use case for the control. Affects what condition + // fields can be set. Only applies to SOLUTION_TYPE_SEARCH. Currently only + // allow one use case per control. Must be set when solution_type is + // SolutionType.SOLUTION_TYPE_SEARCH. + // + // Possible values: + // "SEARCH_USE_CASE_UNSPECIFIED" - Value used when unset. Will not occur in + // CSS. + // "SEARCH_USE_CASE_SEARCH" - Search use case. Expects the traffic has a + // non-empty query. + // "SEARCH_USE_CASE_BROWSE" - Browse use case. Expects the traffic has an + // empty query. + UseCases []string `json:"useCases,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssociatedServingConfigIds") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssociatedServingConfigIds") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControl) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControl + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlBoostAction: Adjusts order of +// products in returned list. +type GoogleCloudDiscoveryengineV1betaControlBoostAction struct { + // Boost: Required. Strength of the boost, which should be in [-1, 1]. Negative + // boost means demotion. Default is 0.0 (No-op). + Boost float64 `json:"boost,omitempty"` + // DataStore: Required. Specifies which data store's documents can be boosted + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. Specifies which products to apply the boost to. If no + // filter is provided all products will be boosted (No-op). Syntax + // documentation: https://cloud.google.com/retail/docs/filter-and-order Maximum + // length is 5000 characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Boost") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Boost") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaControlBoostAction) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaControlBoostAction + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} + +// GoogleCloudDiscoveryengineV1betaControlFilterAction: Specified which +// products may be included in results. Uses same filter as boost. +type GoogleCloudDiscoveryengineV1betaControlFilterAction struct { + // DataStore: Required. Specifies which data store's documents can be filtered + // by this control. Full data store name e.g. + // projects/123/locations/global/collections/default_collection/dataStores/defau + // lt_data_store + DataStore string `json:"dataStore,omitempty"` + // Filter: Required. A filter to apply on the matching condition results. + // Required Syntax documentation: + // https://cloud.google.com/retail/docs/filter-and-order Maximum length is 5000 + // characters. Otherwise an INVALID ARGUMENT error is thrown. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataStore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataStore") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlFilterAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlFilterAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlRedirectAction: Redirects a shopper +// to the provided URI. +type GoogleCloudDiscoveryengineV1betaControlRedirectAction struct { + // RedirectUri: Required. The URI to which the shopper will be redirected. + // Required. URI must have length equal or less than 2000 characters. Otherwise + // an INVALID ARGUMENT error is thrown. + RedirectUri string `json:"redirectUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "RedirectUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RedirectUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlRedirectAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlRedirectAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaControlSynonymsAction: Creates a set of +// terms that will act as synonyms of one another. Example: "happy" will also +// be considered as "glad", "glad" will also be considered as "happy". +type GoogleCloudDiscoveryengineV1betaControlSynonymsAction struct { + // Synonyms: Defines a set of synonyms. Can specify up to 100 synonyms. Must + // specify at least 2 synonyms. Otherwise an INVALID ARGUMENT error is thrown. + Synonyms []string `json:"synonyms,omitempty"` + // ForceSendFields is a list of field names (e.g. "Synonyms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Synonyms") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaControlSynonymsAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaControlSynonymsAction + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaConversation: External conversation proto +// definition. +type GoogleCloudDiscoveryengineV1betaConversation struct { + // EndTime: Output only. The time the conversation finished. + EndTime string `json:"endTime,omitempty"` + // Messages: Conversation messages. + Messages []*GoogleCloudDiscoveryengineV1betaConversationMessage `json:"messages,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/global/collections/{collection}/dataStore/*/con + // versations/*` or + // `projects/{project}/locations/global/collections/{collection}/engines/*/conve + // rsations/*`. + Name string `json:"name,omitempty"` + // StartTime: Output only. The time the conversation started. + StartTime string `json:"startTime,omitempty"` + // State: The state of the Conversation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Conversation is currently open. + // "COMPLETED" - Conversation has been completed. + State string `json:"state,omitempty"` + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaConversation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversation + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaConversationContext: Defines context of the +// conversation +type GoogleCloudDiscoveryengineV1betaConversationContext struct { + // ActiveDocument: The current active document the user opened. It contains the + // document resource reference. + ActiveDocument string `json:"activeDocument,omitempty"` + // ContextDocuments: The current list of documents the user is seeing. It + // contains the document resource references. + ContextDocuments []string `json:"contextDocuments,omitempty"` + // ForceSendFields is a list of field names (e.g. "ActiveDocument") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ActiveDocument") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaConversationContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversationContext + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaConversationMessage: Defines a conversation +// message. +type GoogleCloudDiscoveryengineV1betaConversationMessage struct { + // CreateTime: Output only. Message creation timestamp. + CreateTime string `json:"createTime,omitempty"` + // Reply: Search reply. + Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` + // UserInput: User text input. + UserInput *GoogleCloudDiscoveryengineV1betaTextInput `json:"userInput,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversationMessage + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaConverseConversationRequest: Request message +// for ConversationalSearchService.ConverseConversation method. +type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { + // BoostSpec: Boost specification to boost certain documents in search results + // which may affect the converse response. For more information on boosting, + // see Boosting (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` + // Conversation: The conversation to be used by auto session only. The name + // field will be ignored as we automatically assign new name for the + // conversation in auto session. + Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` + // Filter: The filter syntax consists of an expression language for // constructing a predicate from one or more fields of the documents being // filtered. Filter expression is case-sensitive. This will be used to filter // search results which may affect the summary response. If this field is @@ -7274,14 +8270,15 @@ type GoogleCloudDiscoveryengineV1betaCustomTuningModel struct { // `TRAINING_FAILED`). // // Possible values: - // "MODEL_STATE_UNSPECIFIED" + // "MODEL_STATE_UNSPECIFIED" - Default value. // "TRAINING_PAUSED" - The model is in a paused training state. // "TRAINING" - The model is currently training. // "TRAINING_COMPLETE" - The model has successfully completed training. // "READY_FOR_SERVING" - The model is ready for serving. // "TRAINING_FAILED" - The model training failed. - ModelState string `json:"modelState,omitempty"` - ModelVersion int64 `json:"modelVersion,omitempty,string"` + ModelState string `json:"modelState,omitempty"` + // ModelVersion: The version of the model. + ModelVersion int64 `json:"modelVersion,omitempty,string"` // Name: Required. The fully qualified resource name of the model. Format: // `projects/{project_number}/locations/{location}/collections/{collection}/data // Stores/{data_store}/customTuningModels/{custom_tuning_model}` model must be @@ -8055,9 +9052,8 @@ func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() // GoogleCloudDiscoveryengineV1betaEngineCommonConfig: Common configurations // for an Engine. type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { - // CompanyName: Immutable. The name of the company, business or entity that is - // associated with the engine. Setting this may help improve LLM related - // features. + // CompanyName: The name of the company, business or entity that is associated + // with the engine. Setting this may help improve LLM related features. CompanyName string `json:"companyName,omitempty"` // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with empty or @@ -8784,6 +9780,34 @@ func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) er return nil } +// GoogleCloudDiscoveryengineV1betaListControlsResponse: Response for +// ListControls method. +type GoogleCloudDiscoveryengineV1betaListControlsResponse struct { + // Controls: All the Controls for a given data store. + Controls []*GoogleCloudDiscoveryengineV1betaControl `json:"controls,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Controls") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Controls") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaListControlsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListControlsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaListConversationsResponse: Response for // ListConversations method. type GoogleCloudDiscoveryengineV1betaListConversationsResponse struct { @@ -9171,20 +10195,136 @@ func (s *GoogleCloudDiscoveryengineV1betaPanelInfo) MarshalJSON() ([]byte, error type GoogleCloudDiscoveryengineV1betaPauseEngineRequest struct { } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to -// the progress of the PurgeDocuments operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1betaProject: Metadata and configurations for a +// Google Cloud project in the service. +type GoogleCloudDiscoveryengineV1betaProject struct { + // CreateTime: Output only. The timestamp when this project is created. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - // IgnoredCount: Count of entries that were ignored as entries were not found. - IgnoredCount int64 `json:"ignoredCount,omitempty,string"` - // SuccessCount: Count of entries that were deleted successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, this is - // also the finish time. + // Name: Output only. Full resource name of the project, for example + // `projects/{project_number}`. Note that when making requests, project number + // and project id are both acceptable, but the server will always respond in + // project number. + Name string `json:"name,omitempty"` + // ProvisionCompletionTime: Output only. The timestamp when this project is + // successfully provisioned. Empty value means this project is still + // provisioning and is not ready for use. + ProvisionCompletionTime string `json:"provisionCompletionTime,omitempty"` + // ServiceTermsMap: Output only. A map of terms of services. The key is the + // `id` of ServiceTerms. + ServiceTermsMap map[string]GoogleCloudDiscoveryengineV1betaProjectServiceTerms `json:"serviceTermsMap,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaProject) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProject + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProjectServiceTerms: Metadata about the +// terms of service. +type GoogleCloudDiscoveryengineV1betaProjectServiceTerms struct { + // AcceptTime: The last time when the project agreed to the terms of service. + AcceptTime string `json:"acceptTime,omitempty"` + // DeclineTime: The last time when the project declined or revoked the + // agreement to terms of service. + DeclineTime string `json:"declineTime,omitempty"` + // Id: The unique identifier of this terms of service. Available terms: * + // `GA_DATA_USE_TERMS`: Terms for data use + // (https://cloud.google.com/retail/data-use-terms). When using this as `id`, + // the acceptable version to provide is `2022-11-23`. + Id string `json:"id,omitempty"` + // State: Whether the project has accepted/rejected the service terms or it is + // still pending. + // + // Possible values: + // "STATE_UNSPECIFIED" - The default value of the enum. This value is not + // actually used. + // "TERMS_ACCEPTED" - The project has given consent to the terms of service. + // "TERMS_PENDING" - The project is pending to review and accept the terms of + // service. + // "TERMS_DECLINED" - The project has declined or revoked the agreement to + // terms of service. + State string `json:"state,omitempty"` + // Version: The version string of the terms of service. For acceptable values, + // see the comments for id above. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaProjectServiceTerms) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProjectServiceTerms + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata: Metadata +// associated with a project provision operation. +type GoogleCloudDiscoveryengineV1betaProvisionProjectMetadata struct { +} + +// GoogleCloudDiscoveryengineV1betaProvisionProjectRequest: Request for +// ProjectService.ProvisionProject method. +type GoogleCloudDiscoveryengineV1betaProvisionProjectRequest struct { + // AcceptDataUseTerms: Required. Set to `true` to specify that caller has read + // and would like to give consent to the Terms for data use + // (https://cloud.google.com/retail/data-use-terms). + AcceptDataUseTerms bool `json:"acceptDataUseTerms,omitempty"` + // DataUseTermsVersion: Required. The version of the Terms for data use + // (https://cloud.google.com/retail/data-use-terms) that caller has read and + // would like to give consent to. Acceptable version is `2022-11-23`, and this + // may change over time. + DataUseTermsVersion string `json:"dataUseTermsVersion,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptDataUseTerms") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptDataUseTerms") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaProvisionProjectRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata: Metadata related to +// the progress of the PurgeDocuments operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + // FailureCount: Count of entries that encountered errors while processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + // IgnoredCount: Count of entries that were ignored as entries were not found. + IgnoredCount int64 `json:"ignoredCount,omitempty,string"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, this is + // also the finish time. UpdateTime string `json:"updateTime,omitempty"` // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with empty or @@ -9363,6 +10503,19 @@ type GoogleCloudDiscoveryengineV1betaRankRequest struct { // TopN: The number of results to return. If this is unset or no bigger than // zero, returns all results. TopN int64 `json:"topN,omitempty"` + // UserLabels: The user labels applied to a resource must meet the following + // requirements: * Each resource can have multiple labels, up to a maximum of + // 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 + // character and a maximum length of 63 characters and cannot be empty. Values + // can be empty and have a maximum length of 63 characters. * Keys and values + // can contain only lowercase letters, numeric characters, underscores, and + // dashes. All characters must use UTF-8 encoding, and international characters + // are allowed. * The key portion of a label must be unique. However, you can + // use the same key with multiple resources. * Keys must start with a lowercase + // letter or international character. See Google Cloud Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. // "IgnoreRecordDetailsInResponse") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API @@ -12052,6 +13205,13 @@ type GoogleCloudDiscoveryengineV1betaUserEvent struct { // event. This field should be set for `search` event when autocomplete // function is enabled and the user clicks a suggestion for search. CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` + // DataStore: The DataStore resource full name, of the form + // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor + // es/{data_store_id}`. Optional. Only required for user events whose data + // store can't by determined by UserEvent.engine or UserEvent.documents. If + // data store is set in the parent of write/import/collect user event requests, + // this field can be omitted. + DataStore string `json:"dataStore,omitempty"` // DirectUserRequest: Should set to true if the request is made directly from // the end user, in which case the UserEvent.user_info.user_agent can be // populated from the HTTP request. This flag should be set only if the API @@ -12069,6 +13229,11 @@ type GoogleCloudDiscoveryengineV1betaUserEvent struct { // for the same query, a new `search` event with different UserEvent.documents // is desired. Documents []*GoogleCloudDiscoveryengineV1betaDocumentInfo `json:"documents,omitempty"` + // Engine: The Engine resource name, in the form of + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}`. Optional. Only required for Engine produced user events. For + // example, user events from blended search. + Engine string `json:"engine,omitempty"` // EventTime: Only required for UserEventService.ImportUserEvents method. // Timestamp of when the user event happened. EventTime string `json:"eventTime,omitempty"` @@ -12353,6 +13518,112 @@ func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type ProjectsProvisionCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaprovisionprojectrequest *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Provision: Provisions the project resource. During the process, related +// systems will get prepared and initialized. Caller must read the Terms for +// data use (https://cloud.google.com/retail/data-use-terms), and optionally +// specify in request to provide consent to that service terms. +// +// - name: Full resource name of a Project, such as +// `projects/{project_id_or_number}`. +func (r *ProjectsService) Provision(name string, googleclouddiscoveryenginev1betaprovisionprojectrequest *GoogleCloudDiscoveryengineV1betaProvisionProjectRequest) *ProjectsProvisionCall { + c := &ProjectsProvisionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaprovisionprojectrequest = googleclouddiscoveryenginev1betaprovisionprojectrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsProvisionCall) Fields(s ...googleapi.Field) *ProjectsProvisionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsProvisionCall) Context(ctx context.Context) *ProjectsProvisionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsProvisionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsProvisionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaprovisionprojectrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:provision") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.provision" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsProvisionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { s *Service name string @@ -13246,7 +14517,7 @@ func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *Pro } // Filter sets the optional parameter "filter": Filter by solution type . For -// example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +// example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'` func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { c.urlParams_.Set("filter", filter) return c @@ -14793,64 +16064,71 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14858,18 +16136,18 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ } 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.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14888,7 +16166,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14901,112 +16179,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. -// -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { +type ProjectsLocationsCollectionsDataStoresControlsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15014,14 +16187,14 @@ type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15029,27 +16202,27 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -15067,13 +16240,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15105,7 +16278,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15114,13 +16287,13 @@ type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Control. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Get(name string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { + c := &ProjectsLocationsCollectionsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15128,7 +16301,7 @@ func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15136,27 +16309,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s .. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15177,13 +16350,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15202,7 +16375,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15215,7 +16388,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { +type ProjectsLocationsCollectionsDataStoresControlsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -15224,45 +16397,36 @@ type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all Controls by their parent DataStore. // // - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) List(parent string) *ProjectsLocationsCollectionsDataStoresControlsListCall { + c := &ProjectsLocationsCollectionsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of results // to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15270,7 +16434,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15278,27 +16442,27 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s . // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15306,7 +16470,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15319,13 +16483,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15344,7 +16508,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15360,7 +16524,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -15378,34 +16542,32 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx } } -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be changed. -// If the Conversation to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -15413,30 +16575,30 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } @@ -15455,13 +16617,13 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.controls.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15480,7 +16642,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15493,86 +16655,83 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsDataStoresCustomModelsListCall struct { - s *Service - dataStore string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of all the custom models. +// Converse: Converses a conversation. // -// - dataStore: The resource name of the parent Data Store, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. This field is used to identify the data store where to -// fetch the models from. -func (r *ProjectsLocationsCollectionsDataStoresCustomModelsService) List(dataStore string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { - c := &ProjectsLocationsCollectionsDataStoresCustomModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}/customModels") + 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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.customModels.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListCustomModelsResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. +// Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListCustomModelsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15591,7 +16750,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListCustomModelsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15604,85 +16763,80 @@ func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + 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 Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15701,7 +16855,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15714,87 +16868,57 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall 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 Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -15805,13 +16929,13 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15830,7 +16954,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15843,28 +16967,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15873,13 +16976,13 @@ type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// Get: Gets a Conversation. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15887,7 +16990,7 @@ func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15895,27 +16998,27 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...go // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -15936,13 +17039,13 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15961,7 +17064,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo 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, @@ -15974,41 +17077,54 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsListCall 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 *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c +} -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `update_time` * `create_time` * +// `conversation_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -16016,7 +17132,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16024,27 +17140,27 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16052,7 +17168,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "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 { @@ -16060,18 +17176,18 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16090,7 +17206,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go 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, @@ -16106,7 +17222,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16124,88 +17240,90 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx con } } -type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to use for -// the Schema, which becomes the final component of the Schema.name. This field -// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard -// with a length limit of 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + 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.schemas.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16224,7 +17342,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo 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, @@ -16237,73 +17355,86 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresCustomModelsListCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// List: Gets a list of all the custom models. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - dataStore: The resource name of the parent Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. This field is used to identify the data store where to +// fetch the models from. +func (r *ProjectsLocationsCollectionsDataStoresCustomModelsService) List(dataStore string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c := &ProjectsLocationsCollectionsDataStoresCustomModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCustomModelsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}/customModels") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.customModels.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleCloudDiscoveryengineV1betaListCustomModelsResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCustomModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListCustomModelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16322,7 +17453,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListCustomModelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16335,7 +17466,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16344,13 +17475,13 @@ type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { header_ http.Header } -// Get: Gets a Schema. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16358,7 +17489,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16366,27 +17497,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16407,13 +17538,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16432,7 +17563,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16445,40 +17576,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Schemas. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// Schemas to return. The service may return fewer than this value. If -// unspecified, at most 100 Schemas are returned. The maximum value is 1000; -// values above 1000 are set to 1000. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous SchemaService.ListSchemas call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// SchemaService.ListSchemas must match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -16486,7 +17618,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16494,27 +17626,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16522,7 +17654,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16530,18 +17662,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16560,7 +17692,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16576,7 +17708,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16594,120 +17726,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx contex } } -type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Schema. -// -// - name: Immutable. The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Schema is not found, a new Schema is created. In this situation, -// `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16721,8 +17740,8 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16730,7 +17749,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(nam // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16738,27 +17757,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields( // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16779,13 +17798,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16817,7 +17836,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16830,28 +17849,28 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -16859,7 +17878,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16867,27 +17886,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -16908,13 +17927,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16949,7 +17968,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -16967,63 +17986,69 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages( } } -type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Create: Creates a Schema. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{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 becomes the final component of the Schema.name. This field +// should conform to RFC-1034 (https://tools.ietf.org/html/rfc1034) standard +// with a length limit of 63 characters. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17031,18 +18056,18 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17061,7 +18086,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17074,7 +18099,105 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Schema. +// +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17083,14 +18206,13 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// Get: Gets a Schema. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17098,7 +18220,7 @@ func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17106,27 +18228,27 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s . // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17147,13 +18269,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17172,7 +18294,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17185,7 +18307,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -17194,29 +18316,31 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// List: Gets a list of Schemas. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Schemas to return. The service may return fewer than this value. If +// unspecified, at most 100 Schemas are returned. The maximum value is 1000; +// values above 1000 are set to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +// from a previous SchemaService.ListSchemas call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// SchemaService.ListSchemas must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17224,7 +18348,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17232,27 +18356,27 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17260,7 +18384,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17273,13 +18397,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17298,7 +18422,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17314,7 +18438,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -17332,63 +18456,63 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx } } -type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Patch: Updates a Schema. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema 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) +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Schema is not found, a new Schema is created. In this situation, +// `update_mask` is ignored. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } @@ -17407,13 +18531,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17432,7 +18556,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17445,85 +18569,85 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user event. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17542,7 +18666,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17555,83 +18679,104 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o return ret, nil } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + 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{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17650,7 +18795,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17666,9 +18811,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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -17680,65 +18825,67 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Answer: Answer query method. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -17746,18 +18893,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17776,7 +18923,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17789,106 +18936,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. -// -// - name: The resource name of the Session to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleProtobufEmpty{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17897,13 +18945,14 @@ type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { header_ http.Header } -// Get: Gets a Session. +// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17911,7 +18960,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17919,27 +18968,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -17960,13 +19009,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, 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 { @@ -17985,7 +19034,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17998,7 +19047,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -18007,45 +19056,29 @@ type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// 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 `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +// 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 } @@ -18053,7 +19086,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18061,27 +19094,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...goo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18089,7 +19122,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18102,13 +19135,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18127,7 +19160,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18143,7 +19176,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...goog // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18161,32 +19194,32 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx conte } } -type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // // - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +// 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 } @@ -18194,30 +19227,30 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(upd // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } @@ -18236,13 +19269,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18261,7 +19294,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18274,85 +19307,85 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} -// Get: Gets a Answer. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - name: The resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) + if err != nil { + return nil, err + } 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("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { +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 { @@ -18371,7 +19404,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswer{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18384,61 +19417,64 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + 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. +// Search: Performs a search. // -// - parent: The parent resource shared by all TargetSites being verified. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18446,18 +19482,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -18476,7 +19512,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget 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, @@ -18489,61 +19525,82 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest - 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site -// search. +type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -18551,18 +19608,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18581,7 +19638,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18594,69 +19651,874 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site -// search. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea -// rchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Session. +// +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaSession{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Sessions by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaSession{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Answer. +// +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest + 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. +// +// - parent: The parent resource shared by all TargetSites being verified. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DisableAdvancedSiteSearch: Downgrade from advanced site search to basic site +// search. +// +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls += "?" + 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{ + "siteSearchEngine": c.siteSearchEngine, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced site +// search. +// +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSea +// rchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") + 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{ + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } @@ -18667,7 +20529,733 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { + s *Service + siteSearchEngine string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchDomainVerificationStatus: Returns list of target sites with its domain +// verification status. This method can only be called under data store with +// BASIC_SITE_SEARCH state at the moment. +// +// - siteSearchEngine: The site search engine resource under which we fetch all +// the domain verification status. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. The maximum value is 1000; values above 1000 will be +// coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `FetchDomainVerificationStatus` call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to `FetchDomainVerificationStatus` must match the call that provided the +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus") + 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{ + "siteSearchEngine": c.siteSearchEngine, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse.Server +// Response.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RecrawlUris: Request on-demand recrawl for a list of URIs. +// +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") + 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{ + "siteSearchEngine": c.siteSearchEngine, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall 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 *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 +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// BatchCreate: Creates TargetSite in a batch. +// +// - parent: The parent resource shared by all TargetSites being created. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a TargetSite. +// +// - parent: Parent resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18699,26 +21287,239 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a TargetSite. +// +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a TargetSite. +// +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller +// does not have permission to access the TargetSite, regardless of whether +// or not it exists, a PERMISSION_DENIED error is returned. If the requested +// TargetSite does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// 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 { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// 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. +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of TargetSites. // -// - siteSearchEngine: The site search engine resource under which we fetch all -// the domain verification status. +// - parent: The parent site search engine resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine +// s/{data_store}/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 } @@ -18727,17 +21528,16 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDom // 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 { +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 `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 { +// from a previous `ListTargetSites` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListTargetSites` must match the call that provided the page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18745,7 +21545,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18753,27 +21553,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -18781,7 +21581,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18789,18 +21589,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse.Server -// Response.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerResponse.Heade +// r or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18819,7 +21619,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18835,7 +21635,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -18853,78 +21653,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest - 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 } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// Patch: Updates a TargetSite. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such as -// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betarecrawlurisrequest = googleclouddiscoveryenginev1betarecrawlurisrequest +// - name: Output only. The fully qualified resource name of the target site. +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The +// `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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 { @@ -18956,7 +21758,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18970,8 +21772,8 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall str // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -18979,7 +21781,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18987,27 +21789,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19028,13 +21830,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -19066,7 +21868,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -19079,28 +21881,28 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall st // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -19108,7 +21910,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19116,27 +21918,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -19157,13 +21959,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 { @@ -19198,7 +22000,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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -19216,61 +22018,60 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - parent: The parent resource shared by all TargetSites being created. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest + c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19283,13 +22084,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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 { @@ -19321,60 +22122,60 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: 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.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite + c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19387,13 +22188,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) 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 { @@ -19425,76 +22226,112 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { - s *Service - name string - 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 } -// Delete: Deletes a TargetSite. +// 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. // -// - name: Full resource name of TargetSite, such as +// - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Ets sets the optional parameter "ets": The event timestamp in milliseconds. +// This prevents browser caching of otherwise identical get requests. The name +// is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) + return c +} + +// Uri sets the optional parameter "uri": The URL including cgi-parameters but +// excluding the hash fragment with a length limit of 5,000 characters. This is +// often more useful than the referer URL, because many browsers only send the +// domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL encoded +// UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } 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}/userEvents:collect") 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.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned 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) { +// *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 { @@ -19513,7 +22350,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete 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, @@ -19526,88 +22363,83 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a TargetSite. +// 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 TargetSite, such as +// - parent: Parent DataStore resource name, of the form // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller -// does not have permission to access the TargetSite, regardless of whether -// or not it exists, a PERMISSION_DENIED error is returned. If the requested -// TargetSite does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// s/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("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. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, 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 { @@ -19626,7 +22458,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, @@ -19639,89 +22471,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { - s *Service - parent 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 } -// List: Gets a list of TargetSites. +// Write: Writes a single user event. // -// - parent: The parent site search engine resource name, such as +// - parent: The parent resource name. If the write user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. 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)} +// s/{data_store}`. If the write user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent return c } -// 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) +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betauserevent) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + 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 } @@ -19732,13 +22548,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerResponse.Heade -// r or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19757,7 +22573,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ + ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19770,101 +22586,88 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + 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 +// Create: Creates a Engine. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c } -// Patch: Updates a TargetSite. -// -// - name: Output only. The fully qualified resource name of the target site. -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine/targetSites/{target_site}` The -// `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite +// EngineId sets the optional parameter "engineId": Required. The ID to use for +// the Engine, which will become the final component of the Engine's resource +// name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) 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 *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19896,22 +22699,24 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// Delete: Deletes a Engine. // -// - 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 Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. If the caller does not have permission to delete the +// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the Engine to delete does not exist, a NOT_FOUND error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -19919,45 +22724,34 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) 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 *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -19968,13 +22762,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20006,7 +22800,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return ret, nil } -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20015,40 +22809,21 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperations 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 Engine. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20056,27 +22831,27 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) 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 *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -20084,7 +22859,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/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20097,13 +22872,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20122,7 +22897,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20135,83 +22910,86 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// List: Lists all the Engines associated with the project. // -// - 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)} +// - 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.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest + 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 // details. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/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 } @@ -20222,13 +23000,13 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 { @@ -20247,7 +23025,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20260,79 +23038,111 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa return ret, nil } -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest - 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 *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Purge: Permanently deletes all SuggestionDenyListEntry for a DataStore. +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an Engine // -// - 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: Immutable. The fully qualified resource name of the engine. This +// field must be a UTF-8 encoded string with a length limit of 1024 +// characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}` engine should be 1-63 characters, and valid characters are +// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Engine to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) 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 *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/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("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.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20351,7 +23161,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20364,112 +23174,80 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPauseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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. +// Pause: Pauses the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in milliseconds. -// This prevents browser caching of otherwise identical get requests. The name -// is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including cgi-parameters but -// excluding the hash fragment with a length limit of 5,000 characters. This is -// often more useful than the referer URL, because many browsers only send the -// domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL encoded -// UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// - name: The name of the engine to pause. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betapauseenginerequest = googleclouddiscoveryenginev1betapauseenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapauseenginerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:pause") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20488,7 +23266,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20501,64 +23279,61 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest + 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. +// Resume: Resumes the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest +// - name: The name of the engine to resume. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { + c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaresumeenginerequest = googleclouddiscoveryenginev1betaresumeenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) 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 *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaresumeenginerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:resume") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20566,18 +23341,18 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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.dataStores.userEvents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20596,7 +23371,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20609,63 +23384,61 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Write: Writes a single user event. +// Tune: Tunes an existing engine. Only applicable if SolutionType is +// SOLUTION_TYPE_RECOMMENDATION. // -// - parent: The parent resource name. If the write user event action is -// applied in DataStore level, the format is: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. If the write user event action is applied in Location -// level, for example, the event with Document across multiple DataStore, the -// format is: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent +// - name: The resource name of the engine to tune. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betatuneenginerequest = googleclouddiscoveryenginev1betatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) 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 *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betauserevent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatuneenginerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:tune") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20673,18 +23446,18 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20703,7 +23476,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, @@ -20716,69 +23489,71 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Engine. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c := &ProjectsLocationsCollectionsEnginesControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol 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) +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) ControlId(controlId string) *ProjectsLocationsCollectionsEnginesControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) 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 *ProjectsLocationsCollectionsEnginesControlsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20791,13 +23566,13 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20816,7 +23591,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20829,7 +23604,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesDeleteCall struct { +type ProjectsLocationsCollectionsEnginesControlsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20837,16 +23612,14 @@ type ProjectsLocationsCollectionsEnginesDeleteCall struct { header_ http.Header } -// Delete: Deletes a Engine. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. If the caller does not have permission to delete the -// Engine, regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the Engine to delete does not exist, a NOT_FOUND error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Delete(name string) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20854,27 +23627,27 @@ func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) 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 *ProjectsLocationsCollectionsEnginesControlsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -20892,13 +23665,13 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20917,7 +23690,7 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20930,7 +23703,7 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesGetCall struct { +type ProjectsLocationsCollectionsEnginesControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20939,13 +23712,13 @@ type ProjectsLocationsCollectionsEnginesGetCall struct { header_ http.Header } -// Get: Gets a Engine. +// Get: Gets a Control. // -// - name: Full resource name of Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Get(name string) *ProjectsLocationsCollectionsEnginesControlsGetCall { + c := &ProjectsLocationsCollectionsEnginesControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20953,7 +23726,7 @@ func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20961,27 +23734,27 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) 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 *ProjectsLocationsCollectionsEnginesControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21002,13 +23775,13 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21027,7 +23800,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21040,7 +23813,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsCollectionsEnginesListCall struct { +type ProjectsLocationsCollectionsEnginesControlsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21049,31 +23822,36 @@ type ProjectsLocationsCollectionsEnginesListCall struct { header_ http.Header } -// List: Lists all the Engines associated with the project. +// List: Lists all Controls by their parent DataStore. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { - c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) List(parent string) *ProjectsLocationsCollectionsEnginesControlsListCall { + c := &ProjectsLocationsCollectionsEnginesControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter by solution type. For -// example: solution_type=SOLUTION_TYPE_SEARCH -func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21081,7 +23859,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21089,27 +23867,27 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) 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 *ProjectsLocationsCollectionsEnginesControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -21117,7 +23895,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21130,13 +23908,13 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header // or (if a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEnginesResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21155,7 +23933,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21171,7 +23949,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -21189,34 +23967,32 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, } } -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. // -// - name: Immutable. The fully qualified resource name of the engine. This -// field must be a UTF-8 encoded string with a length limit of 1024 -// characters. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}` engine should be 1-63 characters, and valid characters are -// /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsCollectionsEnginesControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsCollectionsEnginesControlsPatchCall { + c := &ProjectsLocationsCollectionsEnginesControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol return c } // UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Engine to update. If an unsupported or unknown field is -// provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -21224,30 +24000,30 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesControlsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) 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 *ProjectsLocationsCollectionsEnginesControlsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } @@ -21266,13 +24042,13 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.controls.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21291,7 +24067,7 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21304,61 +24080,64 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCollectionsEnginesPauseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Pause: Pauses the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// Converse: Converses a conversation. // -// - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { - c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/-` to activate auto session +// mode, which automatically creates a new conversation inside a +// ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betapauseenginerequest = googleclouddiscoveryenginev1betapauseenginerequest + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) 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 *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapauseenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:pause") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21371,13 +24150,13 @@ 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.conversations.converse" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21396,7 +24175,7 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21409,61 +24188,61 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCollectionsEnginesResumeCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resume: Resumes the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { - c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaresumeenginerequest = googleclouddiscoveryenginev1betaresumeenginerequest +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) 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 *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaresumeenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21471,18 +24250,18 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, 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 { @@ -21501,7 +24280,7 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21514,63 +24293,57 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsEnginesTuneCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Tune: Tunes an existing engine. Only applicable if SolutionType is -// SOLUTION_TYPE_RECOMMENDATION. +// Delete: Deletes a Conversation. If the Conversation to delete does not +// exist, a NOT_FOUND error is returned. // -// - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection_ -// id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { - c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betatuneenginerequest = googleclouddiscoveryenginev1betatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatuneenginerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:tune") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -21581,13 +24354,13 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21606,7 +24379,7 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21619,66 +24392,68 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Get: Gets a Conversation. // // - name: The resource name of the Conversation to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. Use -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/-` to activate auto session -// mode, which automatically creates a new conversation inside a -// ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /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 - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -21689,13 +24464,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// *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 { @@ -21714,7 +24489,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21727,63 +24502,100 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all Conversations by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *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": 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 } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. -// -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListConversations` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + 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 += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -21794,13 +24606,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21819,7 +24631,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21832,57 +24644,94 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Conversation. If the Conversation to delete does not -// exist, a NOT_FOUND error is returned. +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Conversation. Conversation action type cannot be changed. +// If the Conversation to update does not exist, a NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c +// onversations/*` or +// `projects/{project}/locations/global/collections/{collection}/engines/*/con +// versations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Conversation to update. The following are NOT supported: * +// Conversation.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } 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 } @@ -21893,13 +24742,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21918,7 +24767,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21931,7 +24780,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21940,13 +24789,13 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c := &ProjectsLocationsCollectionsEnginesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21954,7 +24803,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21962,27 +24811,27 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...go // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22003,13 +24852,13 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22028,7 +24877,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22041,54 +24890,41 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *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": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `conversation_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListConversations` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -22096,7 +24932,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22104,27 +24940,27 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22132,7 +24968,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22140,18 +24976,18 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22170,7 +25006,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22186,7 +25022,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -22204,90 +25040,82 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx con } } -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + 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. +// Answer: Answer query method. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/dataStore/*/c -// onversations/*` or -// `projects/{project}/locations/global/collections/{collection}/engines/*/con -// versations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Conversation to update. The following are NOT supported: * -// Conversation.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. // Any non-2xx status code is an error. Response headers are in either -// *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 +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22306,7 +25134,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22319,7 +25147,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -22328,13 +25156,14 @@ 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 ServingConfig. Returns a NotFound error if the ServingConfig +// does not exist. // -// - 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 ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -22342,7 +25171,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 // details. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22350,27 +25179,27 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -22391,13 +25220,13 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22416,7 +25245,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google 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, @@ -22429,87 +25258,218 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +type ProjectsLocationsCollectionsEnginesServingConfigsListCall 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 ServingConfigs linked to this 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: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collection}/en +// gines/{engine}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 100. If a value greater than 100 is +// provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListServingConfigs` call. Provide this to retrieve the +// subsequent page. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.ctx_ = ctx 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 +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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)) +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig 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) +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + 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 } @@ -22520,13 +25480,13 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22545,7 +25505,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl 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, @@ -22558,84 +25518,66 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Answer: Answer query method. +// Recommend: Makes a recommendation, which requires a contextual user event. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/*/se -// rvingConfigs/default_serving_config`. This field is used to identify the -// serving configuration name, set of models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` +// One default serving config is created along with your recommendation +// engine creation. The engine ID is used as the ID of the default serving +// config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you can use +// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs +// /my-engine` for your RecommendationService.Recommend requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -22648,13 +25590,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22673,7 +25615,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22686,86 +25628,83 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the ServingConfig -// does not exist. +// Search: Performs a search. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store/servingConfigs/default_serving_config`. This field is used +// to identify the serving configuration name, set of models used to make the +// search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if +// *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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, 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 { @@ -22784,7 +25723,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22794,87 +25733,87 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } } -type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// Create: Creates a Session. If the Session to create already exists, an +// ALREADY_EXISTS error is returned. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collection}/en -// gines/{engine}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 100. If a value greater than 100 is -// provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListServingConfigs` call. Provide this to retrieve the -// subsequent page. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -22885,13 +25824,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22910,7 +25849,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22923,92 +25862,57 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id}/engine -// s/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - 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 *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -23019,13 +25923,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23044,7 +25948,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23057,85 +25961,85 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsGetCall 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 Session. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` -// One default serving config is created along with your recommendation -// engine creation. The engine ID is used as the ID of the default serving -// config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you can use -// `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs -// /my-engine` for your RecommendationService.Recommend requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + 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.engines.servingConfigs.recommend" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23154,7 +26058,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23167,83 +26071,117 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts return ret, nil } -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// List: Lists all Sessions by their parent DataStore. // -// - servingConfig: The resource name of the Search serving config, such as -// `projects/*/locations/global/collections/default_collection/engines/*/servi -// ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store/servingConfigs/default_serving_config`. This field is used -// to identify the serving configuration name, set of models used to make the -// search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection} +// /dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. The supported features are: user_pseudo_id, state. Example: +// "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. Supported fields: * `update_time` * `create_time` * +// `session_name` Example: "update_time desc" "create_time" +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListSessions` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + 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}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23262,7 +26200,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23278,9 +26216,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 { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) + defer c.PageToken(c.urlParams_.Get("pageToken")) for { x, err := c.Do() if err != nil { @@ -23292,56 +26230,64 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { +type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { s *Service - parent string + name string googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a Session. If the Session to create already exists, an -// ALREADY_EXISTS error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If the +// Session to update does not exist, a NOT_FOUND error is returned. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { - c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/global/collections/{collection}/engines/{engi +// ne}/sessions/*`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Session to update. The following are NOT supported: * +// Session.name If not set or empty, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) @@ -23350,26 +26296,26 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt st } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23401,22 +26347,22 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Session. If the Session to delete does not exist, a -// NOT_FOUND error is returned. +// Get: Gets a Answer. // -// - name: The resource name of the Session to delete. Format: +// - name: The resource name of the Answer to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. +func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -23424,34 +26370,45 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -23462,13 +26419,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23487,7 +26444,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23500,7 +26457,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -23509,13 +26466,13 @@ type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { header_ http.Header } -// Get: Gets a Session. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - name: The resource name of the Session to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}/sessions/{session_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -23523,7 +26480,7 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23531,27 +26488,27 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googlea // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23572,13 +26529,13 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23597,7 +26554,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23610,54 +26567,41 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all Sessions by their parent DataStore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": A filter to apply on the list -// results. The supported features are: user_pseudo_id, state. Example: -// "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by, sorted in ascending order. Use "desc" after a field name -// for descending. Supported fields: * `update_time` * `create_time` * -// `session_name` Example: "update_time desc" "create_time" -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of results -// to return. If unspecified, defaults to 50. Max allowed value is 1000. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListSessions` call. Provide this to retrieve the subsequent -// page. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +// 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 } @@ -23665,7 +26609,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23673,27 +26617,27 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -23701,7 +26645,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -23709,18 +26653,18 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { +func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23739,7 +26683,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23755,7 +26699,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googlea // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { +func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -23773,88 +26717,134 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context. } } -type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Session. Session action type cannot be changed. If the -// Session to update does not exist, a NOT_FOUND error is returned. +// CompleteQuery: Completes the specified user input with keyword suggestions. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/global/collections/{collection}/engines/{engi -// ne}/sessions/*`. -func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession +// - dataStore: The parent data store resource name for which the completion is +// performed, such as +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided Session to update. The following are NOT supported: * -// Session.name If not set or empty, all supported fields are updated. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": +// Indicates if tail suggestions should be returned if there are no suggestions +// that match the full query. Even if set to true, if there are suggestions +// that match the full query, those are returned and no tail suggestions are +// returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead input +// used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions generated +// from the past history of SearchService.Search API calls. Do not use it when +// there is no traffic for Search API. * `user-event` - Using suggestions +// generated from user-imported search events. * `document-completable` - Using +// suggestions taken directly from user-imported document fields marked as +// completable. Default values: * `document` is the default model for regular +// dataStores. * `search-history` is the default model for site search +// dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier +// for tracking visitors. For example, this could be implemented with an HTTP +// cookie, which should be able to uniquely identify a visitor on a single +// device. This unique identifier should not change if the visitor logs in or +// out of the website. This field should NOT have a fixed value such as +// `unknown_visitor`. This should be the same identifier as +// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be +// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSession.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23873,7 +26863,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSession{ + ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23886,85 +26876,100 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...google return ret, nil } -type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Answer. +// 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 resource name of the Answer to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{collection} -// /engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`. -func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +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 } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// 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 } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { - c.ifNoneMatch_ = entityTag +// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to +// use for the DataStore, which will become the final component of the +// DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { +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 { @@ -23983,7 +26988,7 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaAnswer{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23996,22 +27001,24 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsCollectionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can use this -// method to poll the operation result at intervals as recommended by the API -// service. +// Delete: Deletes a DataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { - c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to delete +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the DataStore to delete does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24019,45 +27026,34 @@ func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) 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 *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -24068,13 +27064,13 @@ 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. +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24106,7 +27102,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsCollectionsOperationsListCall struct { +type ProjectsLocationsDataStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24115,40 +27111,24 @@ 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 DataStore. // -// - 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: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt +// ores/{data_store_id}`. If the caller does not have permission to access +// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED +// error is returned. If the requested DataStore does not exist, a NOT_FOUND +// error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24156,27 +27136,27 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.F // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) 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 *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24184,7 +27164,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 { @@ -24197,13 +27177,13 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *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 *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24222,7 +27202,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24235,100 +27215,32 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresCompleteQueryCall struct { +type ProjectsLocationsDataStoresGetSiteSearchEngineCall 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. +// GetSiteSearchEngine: Gets the SiteSearchEngine. // -// - dataStore: The parent data store resource name for which the completion is -// performed, such as -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter "includeTailSuggestions": -// Indicates if tail suggestions should be returned if there are no suggestions -// that match the full query. Even if set to true, if there are suggestions -// that match the full query, those are returned and no tail suggestions are -// returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead input -// used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions generated -// from the past history of SearchService.Search API calls. Do not use it when -// there is no traffic for Search API. * `user-event` - Using suggestions -// generated from user-imported search events. * `document-completable` - Using -// suggestions taken directly from user-imported document fields marked as -// completable. Default values: * `document` is the default model for regular -// dataStores. * `search-history` is the default model for site search -// dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c -} - -// UserPseudoId sets the optional parameter "userPseudoId": A unique identifier -// for tracking visitors. For example, this could be implemented with an HTTP -// cookie, which should be able to uniquely identify a visitor on a single -// device. This unique identifier should not change if the visitor logs in or -// out of the website. This field should NOT have a fixed value such as -// `unknown_visitor`. This should be the same identifier as -// UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be -// a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/siteSearchEngine`. If the caller does not have permission +// to access the [SiteSearchEngine], regardless of whether or not it exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24336,27 +27248,27 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24364,7 +27276,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24372,18 +27284,18 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24402,7 +27314,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24415,83 +27327,97 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresListCall 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 the DataStores associated with the project. // -// - 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)} +// - 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 - 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)) +// 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 } -// DataStoreId sets the optional parameter "dataStoreId": Required. The ID to -// use for the DataStore, which will become the final component of the -// DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum allowed +// value is 50. Values above 50 will be coerced to 50. If this field is +// negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the page +// token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -24502,13 +27428,15 @@ func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -24527,7 +27455,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24540,59 +27468,92 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a DataStore. +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore // -// - name: Full resource name of DataStore, such as +// - name: Immutable. The full resource name of the data store. Format: // `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to delete -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the DataStore to delete does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a +// length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided DataStore to update. If an unsupported or unknown field is +// provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } 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 } @@ -24603,13 +27564,13 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24628,7 +27589,7 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24641,88 +27602,92 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Create: Creates a Document. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. If the caller does not have permission to access -// the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED -// error is returned. If the requested DataStore does not exist, a NOT_FOUND -// error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, 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 becomes the final component of the Document.name. If +// the caller does not have permission to create the Document, regardless of +// whether or not it exists, a `PERMISSION_DENIED` error is returned. This +// field must be unique among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 +// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err } - 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) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, 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 { @@ -24741,7 +27706,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24754,24 +27719,24 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Delete: Deletes a Document. // -// - name: Resource name of SiteSearchEngine, such as +// - name: Full resource name of Document, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/siteSearchEngine`. If the caller does not have permission -// to access the [SiteSearchEngine], regardless of whether or not it exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to delete the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the Document to +// delete does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24779,45 +27744,34 @@ func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "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 } @@ -24828,13 +27782,13 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24853,7 +27807,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24866,59 +27820,33 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataStoresListCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// Get: Gets a Document. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id}`. If -// the caller does not have permission to list DataStores under this -// location, regardless of whether or not this data store exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { - c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter by solution type . For -// example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' -func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum allowed -// value is 50. Values above 50 will be coerced to 50. If this field is -// negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the page -// token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does +// not have permission to access the Document, regardless of whether or not +// it exists, a `PERMISSION_DENIED` error is returned. If the requested +// Document does not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24926,27 +27854,27 @@ func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -24954,7 +27882,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}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24962,20 +27890,18 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24994,7 +27920,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, @@ -25007,109 +27933,81 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items are created. Note: It is possible for a +// subset of the Documents to be successfully updated. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id}/dataSt -// ores/{data_store_id}`. This field must be a UTF-8 encoded string with a -// length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.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) +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/dataStore +// s/{data_store}/branches/{branch}`. Requires create/update permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +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. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, 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 { @@ -25128,7 +28026,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25137,79 +28035,95 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil -} - -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + } + return ret, nil } -// Create: Creates a Document. +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 resource name, such as +// - parent: The parent branch resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, +// to list documents under the default branch. If the caller does not have +// permission to list Documents under this branch, regardless of whether or +// not this branch exists, a `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument return c } -// DocumentId sets the optional parameter "documentId": Required. The ID to use -// for the Document, which becomes the final component of the Document.name. If -// the caller does not have permission to create the Document, regardless of -// whether or not it exists, a `PERMISSION_DENIED` error is returned. This -// field must be unique among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 -// characters. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// PageSize sets the optional parameter "pageSize": Maximum number of Documents +// to return. If unspecified, defaults to 100. The maximum allowed value is +// 1000. Values above 1000 are set to 1000. If this field is negative, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -25220,13 +28134,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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 { @@ -25245,7 +28159,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog 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, @@ -25258,59 +28172,99 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes a Document. +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. // -// - name: Full resource name of Document, such as +// - name: Immutable. The full resource name of the document. Format: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to delete the Document, regardless of whether or not -// it exists, a `PERMISSION_DENIED` error is returned. If the Document to -// delete does not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must +// be a UTF-8 encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to `true` +// and the Document is not found, a new Document is be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided imported 'document' to update. If not set, by default +// updates all fields. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } 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 } @@ -25321,13 +28275,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 { @@ -25346,7 +28300,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25359,88 +28313,84 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Document. +// Purge: Permanently deletes all selected Documents in a branch. This process +// is asynchronous. Depending on the number of Documents to be deleted, this +// operation can take hours to complete. Before the delete operation completes, +// some Documents might still be returned by DocumentService.GetDocument or +// DocumentService.ListDocuments. To get a list of the Documents to be deleted, +// set PurgeDocumentsRequest.force to false. // -// - name: Full resource name of Document, such as +// - parent: The parent resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document}`. If the caller does -// not have permission to 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 +// s/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25459,7 +28409,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea 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, @@ -25472,62 +28422,66 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { + s *Service + name string + googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items are created. Note: It is possible for a -// subset of the Documents to be successfully updated. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Requires create/update permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { + c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) 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 *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25535,18 +28489,18 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25565,7 +28519,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25578,53 +28532,30 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Documents. +// Get: Gets the latest state of a long-running operation. Clients can use this +// method to poll the operation result at intervals as recommended by the API +// service. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, -// to list documents under the default branch. If the caller does not have -// permission to list Documents under this branch, regardless of whether or -// not this branch exists, a `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of Documents -// to return. If unspecified, defaults to 100. The maximum allowed value is -// 1000. Values above 1000 are set to 1000. If this field is negative, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25632,27 +28563,27 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -25660,7 +28591,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, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -25668,18 +28599,18 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt str } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25698,7 +28629,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, @@ -25711,99 +28642,87 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}/documents/{document_id}`. This field must -// be a UTF-8 encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument return c } -// AllowMissing sets the optional parameter "allowMissing": If set to `true` -// and the Document is not found, a new Document is be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which fields -// in the provided imported 'document' to update. If not set, by default -// updates all fields. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -25814,13 +28733,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or (if a +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, 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 { @@ -25839,7 +28758,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25849,68 +28768,95 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + 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. +// Create: Creates a Control. By default 1000 controls are allowed for a data +// store. A request can be submitted to adjust this limit. If the Control to +// create already exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Create(parent string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsCreateCall { + c := &ProjectsLocationsDataStoresControlsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// ControlId sets the optional parameter "controlId": Required. The ID to use +// for the Control, which will become the final component of the Control's +// resource name. This value must be within 1-63 characters. Valid characters +// are /a-z-_/. +func (c *ProjectsLocationsDataStoresControlsCreateCall) ControlId(controlId string) *ProjectsLocationsDataStoresControlsCreateCall { + c.urlParams_.Set("controlId", controlId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsCreateCall) 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 *ProjectsLocationsDataStoresControlsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25923,13 +28869,13 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresControlsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25948,7 +28894,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25961,68 +28907,57 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsCancelCall struct { - s *Service - name string - googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresControlsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`. +// Delete: Deletes a Control. If the Control to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { - c := &ProjectsLocationsDataStoresBranchesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Control to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Delete(name string) *ProjectsLocationsDataStoresControlsDeleteCall { + c := &ProjectsLocationsDataStoresControlsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsCancelCall { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataStoresControlsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -26033,13 +28968,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.cancel" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.delete" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresControlsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26071,7 +29006,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsCancelCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsDataStoresControlsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26080,13 +29015,13 @@ type ProjectsLocationsDataStoresBranchesOperationsGetCall 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 Control. // -// - 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 Control to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}/controls/{control_id}`. +func (r *ProjectsLocationsDataStoresControlsService) Get(name string) *ProjectsLocationsDataStoresControlsGetCall { + c := &ProjectsLocationsDataStoresControlsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -26094,7 +29029,7 @@ func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26102,27 +29037,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresControlsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsGetCall) 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 *ProjectsLocationsDataStoresControlsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26143,13 +29078,13 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresControlsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26168,7 +29103,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaControl{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26181,41 +29116,45 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresControlsListCall 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 Controls by their parent DataStore. // -// - 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 +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{collection_ +// id}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresControlsService) List(parent string) *ProjectsLocationsDataStoresControlsListCall { + c := &ProjectsLocationsDataStoresControlsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the list +// results. Supported features: * List all the products under the parent branch +// if filter is unset. Currently this field is unsupported. +func (c *ProjectsLocationsDataStoresControlsListCall) Filter(filter string) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of results +// to return. If unspecified, defaults to 50. Max allowed value is 1000. +func (c *ProjectsLocationsDataStoresControlsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListControls` call. Provide this to retrieve the subsequent +// page. +func (c *ProjectsLocationsDataStoresControlsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -26223,7 +29162,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26231,27 +29170,27 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresControlsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresControlsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresControlsListCall) 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 *ProjectsLocationsDataStoresControlsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -26259,7 +29198,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, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/controls") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26267,18 +29206,18 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.controls.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaListControlsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresControlsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListControlsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26297,7 +29236,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListControlsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26313,7 +29252,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresControlsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListControlsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -26331,6 +29270,119 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx contex } } +type ProjectsLocationsDataStoresControlsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Control. Control action type cannot be changed. If the +// Control to update does not exist, a NOT_FOUND error is returned. +// +// - name: Immutable. Fully qualified name +// `projects/*/locations/global/dataStore/*/controls/*`. +func (r *ProjectsLocationsDataStoresControlsService) Patch(name string, googleclouddiscoveryenginev1betacontrol *GoogleCloudDiscoveryengineV1betaControl) *ProjectsLocationsDataStoresControlsPatchCall { + c := &ProjectsLocationsDataStoresControlsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betacontrol = googleclouddiscoveryenginev1betacontrol + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided Control to update. The following are NOT supported: * +// Control.name * Control.solution_type If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresControlsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresControlsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresControlsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresControlsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresControlsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacontrol) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("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.controls.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaControl.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresControlsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaControl, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaControl{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresConversationsConverseCall struct { s *Service name string @@ -31021,6 +34073,14 @@ func (r *ProjectsLocationsDataStoresUserEventsService) Write(parent string, goog return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsDataStoresUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsDataStoresUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -31597,6 +34657,14 @@ func (r *ProjectsLocationsUserEventsService) Write(parent string, googleclouddis return c } +// WriteAsync sets the optional parameter "writeAsync": If set to true, the +// user event is written asynchronously after validation, and the API responds +// without waiting for the write. +func (c *ProjectsLocationsUserEventsWriteCall) WriteAsync(writeAsync bool) *ProjectsLocationsUserEventsWriteCall { + c.urlParams_.Set("writeAsync", fmt.Sprint(writeAsync)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. diff --git a/fcm/v1/fcm-api.json b/fcm/v1/fcm-api.json index d50f30daac0..2690f298943 100644 --- a/fcm/v1/fcm-api.json +++ b/fcm/v1/fcm-api.json @@ -146,7 +146,7 @@ } } }, - "revision": "20230626", + "revision": "20240524", "rootUrl": "https://fcm.googleapis.com/", "schemas": { "AndroidConfig": { @@ -499,7 +499,7 @@ "additionalProperties": { "type": "string" }, - "description": "Input only. Arbitrary key/value payload, which must be UTF-8 encoded. The key should not be a reserved word (\"from\", \"message_type\", or any word starting with \"google\" or \"gcm\"). When sending payloads containing only data fields to iOS devices, only normal priority (`\"apns-priority\": \"5\"`) is allowed in [`ApnsConfig`](/docs/reference/fcm/rest/v1/projects.messages#apnsconfig).", + "description": "Input only. Arbitrary key/value payload, which must be UTF-8 encoded. The key should not be a reserved word (\"from\", \"message_type\", or any word starting with \"google.\" or \"gcm.notification.\"). When sending payloads containing only data fields to iOS devices, only normal priority (`\"apns-priority\": \"5\"`) is allowed in [`ApnsConfig`](/docs/reference/fcm/rest/v1/projects.messages#apnsconfig).", "type": "object" }, "fcmOptions": { diff --git a/fcm/v1/fcm-gen.go b/fcm/v1/fcm-gen.go index 99aad3828ff..08e7310dca8 100644 --- a/fcm/v1/fcm-gen.go +++ b/fcm/v1/fcm-gen.go @@ -702,9 +702,9 @@ type Message struct { Condition string `json:"condition,omitempty"` // Data: Input only. Arbitrary key/value payload, which must be UTF-8 encoded. // The key should not be a reserved word ("from", "message_type", or any word - // starting with "google" or "gcm"). When sending payloads containing only data - // fields to iOS devices, only normal priority ("apns-priority": "5") is - // allowed in `ApnsConfig` + // starting with "google." or "gcm.notification."). When sending payloads + // containing only data fields to iOS devices, only normal priority + // ("apns-priority": "5") is allowed in `ApnsConfig` // (/docs/reference/fcm/rest/v1/projects.messages#apnsconfig). Data map[string]string `json:"data,omitempty"` // FcmOptions: Input only. Template for FCM SDK feature options to use across diff --git a/healthcare/v1beta1/healthcare-api.json b/healthcare/v1beta1/healthcare-api.json index acaaa109039..5706ead608c 100644 --- a/healthcare/v1beta1/healthcare-api.json +++ b/healthcare/v1beta1/healthcare-api.json @@ -5672,7 +5672,7 @@ } } }, - "revision": "20240508", + "revision": "20240521", "rootUrl": "https://healthcare.googleapis.com/", "schemas": { "AccessDeterminationLogConfig": { @@ -7449,10 +7449,6 @@ "description": "String of comma-delimited FHIR resource types. If provided, only resources of the specified resource type(s) are exported.", "type": "string" }, - "bigqueryDestination": { - "$ref": "GoogleCloudHealthcareV1beta1FhirBigQueryDestination", - "description": "The BigQuery output destination. The Cloud Healthcare Service Agent requires two IAM roles on the BigQuery location: `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one BigQuery table per resource type. Unlike when setting `BigQueryDestination` for `StreamConfig`, `ExportResources` does not create BigQuery views." - }, "gcsDestination": { "$ref": "GoogleCloudHealthcareV1beta1FhirGcsDestination", "description": "The Cloud Storage output destination. The Healthcare Service Agent account requires the `roles/storage.objectAdmin` role on the Cloud Storage location. The exported outputs are organized by FHIR resource types. The server creates one or more objects per resource type depending on the volume of the resources exported. When there is only one object per resource type, the object name is in the form of `{operation_id})_history_{resource_type}`. When there are multiple objects for a given resource type, the object names are in the form of `{operation_id}_history_{resource_type}-{index}-of-{total}`. Each object contains newline delimited JSON, and each line is a FHIR history bundle containing the history for a single resource." diff --git a/healthcare/v1beta1/healthcare-gen.go b/healthcare/v1beta1/healthcare-gen.go index 448cd157fb6..4f724443dda 100644 --- a/healthcare/v1beta1/healthcare-gen.go +++ b/healthcare/v1beta1/healthcare-gen.go @@ -3152,12 +3152,6 @@ type ExportResourcesHistoryRequest struct { // Type: String of comma-delimited FHIR resource types. If provided, only // resources of the specified resource type(s) are exported. Type string `json:"_type,omitempty"` - // BigqueryDestination: The BigQuery output destination. The Cloud Healthcare - // Service Agent requires two IAM roles on the BigQuery location: - // `roles/bigquery.dataEditor` and `roles/bigquery.jobUser`. The output is one - // BigQuery table per resource type. Unlike when setting `BigQueryDestination` - // for `StreamConfig`, `ExportResources` does not create BigQuery views. - BigqueryDestination *GoogleCloudHealthcareV1beta1FhirBigQueryDestination `json:"bigqueryDestination,omitempty"` // GcsDestination: The Cloud Storage output destination. The Healthcare Service // Agent account requires the `roles/storage.objectAdmin` role on the Cloud // Storage location. The exported outputs are organized by FHIR resource types. diff --git a/identitytoolkit/v2/identitytoolkit-api.json b/identitytoolkit/v2/identitytoolkit-api.json index 4c7c4e87aa6..f0451ed02d8 100644 --- a/identitytoolkit/v2/identitytoolkit-api.json +++ b/identitytoolkit/v2/identitytoolkit-api.json @@ -1655,7 +1655,7 @@ } } }, - "revision": "20240417", + "revision": "20240522", "rootUrl": "https://identitytoolkit.googleapis.com/", "schemas": { "GoogleCloudIdentitytoolkitAdminV2AllowByDefault": { @@ -1709,7 +1709,8 @@ "type": "array" }, "codeFlowConfig": { - "$ref": "GoogleCloudIdentitytoolkitAdminV2CodeFlowConfig" + "$ref": "GoogleCloudIdentitytoolkitAdminV2CodeFlowConfig", + "description": "Additional config for Apple for code flow." } }, "type": "object" diff --git a/identitytoolkit/v2/identitytoolkit-gen.go b/identitytoolkit/v2/identitytoolkit-gen.go index 579347ef815..ed7b22fd843 100644 --- a/identitytoolkit/v2/identitytoolkit-gen.go +++ b/identitytoolkit/v2/identitytoolkit-gen.go @@ -406,7 +406,8 @@ func (s *GoogleCloudIdentitytoolkitAdminV2Anonymous) MarshalJSON() ([]byte, erro // SignInWithApple. type GoogleCloudIdentitytoolkitAdminV2AppleSignInConfig struct { // BundleIds: A list of Bundle ID's usable by this project - BundleIds []string `json:"bundleIds,omitempty"` + BundleIds []string `json:"bundleIds,omitempty"` + // CodeFlowConfig: Additional config for Apple for code flow. CodeFlowConfig *GoogleCloudIdentitytoolkitAdminV2CodeFlowConfig `json:"codeFlowConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "BundleIds") to // unconditionally include in API requests. By default, fields with empty or diff --git a/migrationcenter/v1alpha1/migrationcenter-api.json b/migrationcenter/v1alpha1/migrationcenter-api.json index 873a98c5d56..d548833f951 100644 --- a/migrationcenter/v1alpha1/migrationcenter-api.json +++ b/migrationcenter/v1alpha1/migrationcenter-api.json @@ -541,6 +541,162 @@ } } }, + "assetsExportJobs": { + "methods": { + "create": { + "description": "Creates a new assets export job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assetsExportJobs", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.assetsExportJobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "assetsExportJobId": { + "description": "Required. The ID to use for the asset export job.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent resource where the assts export job will be created.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/assetsExportJobs", + "request": { + "$ref": "AssetsExportJob" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes an assets export job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assetsExportJobs/{assetsExportJobsId}", + "httpMethod": "DELETE", + "id": "migrationcenter.projects.locations.assetsExportJobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the assets export job to delete.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assetsExportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of an assets export job.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assetsExportJobs/{assetsExportJobsId}", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.assetsExportJobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assetsExportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}", + "response": { + "$ref": "AssetsExportJob" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all the assets export jobs in a given project and location.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assetsExportJobs", + "httpMethod": "GET", + "id": "migrationcenter.projects.locations.assetsExportJobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Optional. Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results that the server should return.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+parent}/assetsExportJobs", + "response": { + "$ref": "ListAssetsExportJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "run": { + "description": "Runs an assets export job, returning an AssetsExportJobExecution.", + "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/assetsExportJobs/{assetsExportJobsId}:run", + "httpMethod": "POST", + "id": "migrationcenter.projects.locations.assetsExportJobs.run", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/assetsExportJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha1/{+name}:run", + "request": { + "$ref": "RunAssetsExportJobRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "discoveryClients": { "methods": { "create": { @@ -2317,7 +2473,7 @@ } } }, - "revision": "20240516", + "revision": "20240523", "rootUrl": "https://migrationcenter.googleapis.com/", "schemas": { "AddAssetsToGroupRequest": { @@ -2724,6 +2880,132 @@ }, "type": "object" }, + "AssetsExportJob": { + "description": "Assets export job message.", + "id": "AssetsExportJob", + "properties": { + "condition": { + "$ref": "AssetsExportJobExportCondition", + "description": "Optional. Conditions for selecting assets to export." + }, + "createTime": { + "description": "Output only. Resource creation time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be \u003c= 128 bytes.", + "type": "object" + }, + "name": { + "description": "Output only. Identifier. Resource name.", + "readOnly": true, + "type": "string" + }, + "networkDependencies": { + "$ref": "AssetsExportJobNetworkDependencies", + "description": "Export data regarding asset network dependencies." + }, + "recentExecutions": { + "description": "Output only. Recent non expired executions of the job.", + "items": { + "$ref": "AssetsExportJobExecution" + }, + "readOnly": true, + "type": "array" + }, + "signedUriDestination": { + "$ref": "SignedUriDestination", + "description": "Export to Cloud Storage files downloadable using signed URIs." + }, + "updateTime": { + "description": "Output only. Resource update time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AssetsExportJobExecution": { + "description": "Execution status of assets export job.", + "id": "AssetsExportJobExecution", + "properties": { + "endTime": { + "description": "Output only. Completion time of the export.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "executionId": { + "description": "Output only. Globally unique identifier of the execution.", + "readOnly": true, + "type": "string" + }, + "expireTime": { + "description": "Output only. Expiration time for the export and artifacts.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "result": { + "$ref": "AssetsExportJobExecutionResult", + "description": "Output only. Result of the export execution.", + "readOnly": true + }, + "startTime": { + "description": "Output only. Execution timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AssetsExportJobExecutionResult": { + "description": "Contains the result of the assets export.", + "id": "AssetsExportJobExecutionResult", + "properties": { + "error": { + "$ref": "Status", + "description": "Output only. Error encountered during export.", + "readOnly": true + }, + "signedUris": { + "$ref": "SignedUris", + "description": "Output only. Signed URLs for downloading export artifacts.", + "readOnly": true + } + }, + "type": "object" + }, + "AssetsExportJobExportCondition": { + "description": "Conditions for selecting assets to export.", + "id": "AssetsExportJobExportCondition", + "properties": { + "filter": { + "description": "Optional. Assets filter, supports the same syntax as asset listing.", + "type": "string" + } + }, + "type": "object" + }, + "AssetsExportJobNetworkDependencies": { + "description": "Configuration for network dependencies exports.", + "id": "AssetsExportJobNetworkDependencies", + "properties": { + "maxDays": { + "description": "Optional. When this value is set to a positive integer, network connections data will be returned for the most recent days for which data is available. When this value is unset (or set to zero), all available data is returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "AwsEc2PlatformDetails": { "description": "AWS EC2 specific details.", "id": "AwsEc2PlatformDetails", @@ -3147,7 +3429,7 @@ "id": "ComputeEnginePreferences", "properties": { "licenseType": { - "description": "Overridden by os_pricing_preferences if specified. License type to consider when calculating costs for virtual machine insights and recommendations. If unspecified, costs are calculated based on the default licensing plan.", + "description": "If os_pricing_preferences is specified, it overrides this field. License type to consider when calculating costs for virtual machine insights and recommendations. If unspecified, costs are calculated based on the default licensing plan.", "enum": [ "LICENSE_TYPE_UNSPECIFIED", "LICENSE_TYPE_DEFAULT", @@ -5073,6 +5355,26 @@ }, "type": "object" }, + "ListAssetsExportJobsResponse": { + "description": "Response message for listing assets export jobs.", + "id": "ListAssetsExportJobsResponse", + "properties": { + "assetsExportJobs": { + "description": "Output only. The list of assets export jobs.", + "items": { + "$ref": "AssetsExportJob" + }, + "readOnly": true, + "type": "array" + }, + "nextPageToken": { + "description": "Output only. A token identifying a page of results the server should return.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ListAssetsResponse": { "description": "Response message for listing assets.", "id": "ListAssetsResponse", @@ -6877,6 +7179,29 @@ }, "type": "object" }, + "RunAssetsExportJobRequest": { + "description": "A request to run an assets export job.", + "id": "RunAssetsExportJobRequest", + "properties": { + "requestId": { + "description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", + "type": "string" + } + }, + "type": "object" + }, + "RunAssetsExportJobResponse": { + "description": "Response message for running an assets export job.", + "id": "RunAssetsExportJobResponse", + "properties": { + "assetsExportJobExecution": { + "$ref": "AssetsExportJobExecution", + "description": "Output only. Execution status of the assets export operation.", + "readOnly": true + } + }, + "type": "object" + }, "RunImportJobRequest": { "description": "A request to run an import job.", "id": "RunImportJobRequest", @@ -7055,6 +7380,44 @@ }, "type": "object" }, + "SignedUri": { + "description": "Contains a signed URI.", + "id": "SignedUri", + "properties": { + "file": { + "description": "Output only. Name of the file the Signed URI references.", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "Output only. Download URI for the file.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "SignedUriDestination": { + "description": "Signed URI destination configuration.", + "id": "SignedUriDestination", + "properties": {}, + "type": "object" + }, + "SignedUris": { + "description": "Contains a list of Signed URIs.", + "id": "SignedUris", + "properties": { + "signedUris": { + "description": "Output only. List of signed URIs.", + "items": { + "$ref": "SignedUri" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "SoftwareInsight": { "description": "An insight regarding software detected on an asset.", "id": "SoftwareInsight", diff --git a/migrationcenter/v1alpha1/migrationcenter-gen.go b/migrationcenter/v1alpha1/migrationcenter-gen.go index 6751f8b242a..39400635336 100644 --- a/migrationcenter/v1alpha1/migrationcenter-gen.go +++ b/migrationcenter/v1alpha1/migrationcenter-gen.go @@ -169,6 +169,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Assets = NewProjectsLocationsAssetsService(s) + rs.AssetsExportJobs = NewProjectsLocationsAssetsExportJobsService(s) rs.DiscoveryClients = NewProjectsLocationsDiscoveryClientsService(s) rs.Groups = NewProjectsLocationsGroupsService(s) rs.ImportJobs = NewProjectsLocationsImportJobsService(s) @@ -184,6 +185,8 @@ type ProjectsLocationsService struct { Assets *ProjectsLocationsAssetsService + AssetsExportJobs *ProjectsLocationsAssetsExportJobsService + DiscoveryClients *ProjectsLocationsDiscoveryClientsService Groups *ProjectsLocationsGroupsService @@ -208,6 +211,15 @@ type ProjectsLocationsAssetsService struct { s *Service } +func NewProjectsLocationsAssetsExportJobsService(s *Service) *ProjectsLocationsAssetsExportJobsService { + rs := &ProjectsLocationsAssetsExportJobsService{s: s} + return rs +} + +type ProjectsLocationsAssetsExportJobsService struct { + s *Service +} + func NewProjectsLocationsDiscoveryClientsService(s *Service) *ProjectsLocationsDiscoveryClientsService { rs := &ProjectsLocationsDiscoveryClientsService{s: s} return rs @@ -822,6 +834,154 @@ func (s *AssetPerformanceData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// AssetsExportJob: Assets export job message. +type AssetsExportJob struct { + // Condition: Optional. Conditions for selecting assets to export. + Condition *AssetsExportJobExportCondition `json:"condition,omitempty"` + // CreateTime: Output only. Resource creation time. + CreateTime string `json:"createTime,omitempty"` + // Labels: Optional. Labels as key value pairs. Labels must meet the following + // constraints: * Keys and values can contain only lowercase letters, numeric + // characters, underscores, and dashes. * All characters must use UTF-8 + // encoding, and international characters are allowed. * Keys must start with a + // lowercase letter or international character. * Each resource is limited to a + // maximum of 64 labels. Both keys and values are additionally constrained to + // be <= 128 bytes. + Labels map[string]string `json:"labels,omitempty"` + // Name: Output only. Identifier. Resource name. + Name string `json:"name,omitempty"` + // NetworkDependencies: Export data regarding asset network dependencies. + NetworkDependencies *AssetsExportJobNetworkDependencies `json:"networkDependencies,omitempty"` + // RecentExecutions: Output only. Recent non expired executions of the job. + RecentExecutions []*AssetsExportJobExecution `json:"recentExecutions,omitempty"` + // SignedUriDestination: Export to Cloud Storage files downloadable using + // signed URIs. + SignedUriDestination *SignedUriDestination `json:"signedUriDestination,omitempty"` + // UpdateTime: Output only. Resource update time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Condition") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *AssetsExportJob) MarshalJSON() ([]byte, error) { + type NoMethod AssetsExportJob + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// AssetsExportJobExecution: Execution status of assets export job. +type AssetsExportJobExecution struct { + // EndTime: Output only. Completion time of the export. + EndTime string `json:"endTime,omitempty"` + // ExecutionId: Output only. Globally unique identifier of the execution. + ExecutionId string `json:"executionId,omitempty"` + // ExpireTime: Output only. Expiration time for the export and artifacts. + ExpireTime string `json:"expireTime,omitempty"` + // Result: Output only. Result of the export execution. + Result *AssetsExportJobExecutionResult `json:"result,omitempty"` + // StartTime: Output only. Execution timestamp. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *AssetsExportJobExecution) MarshalJSON() ([]byte, error) { + type NoMethod AssetsExportJobExecution + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// AssetsExportJobExecutionResult: Contains the result of the assets export. +type AssetsExportJobExecutionResult struct { + // Error: Output only. Error encountered during export. + Error *Status `json:"error,omitempty"` + // SignedUris: Output only. Signed URLs for downloading export artifacts. + SignedUris *SignedUris `json:"signedUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "Error") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Error") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *AssetsExportJobExecutionResult) MarshalJSON() ([]byte, error) { + type NoMethod AssetsExportJobExecutionResult + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// AssetsExportJobExportCondition: Conditions for selecting assets to export. +type AssetsExportJobExportCondition struct { + // Filter: Optional. Assets filter, supports the same syntax as asset listing. + Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *AssetsExportJobExportCondition) MarshalJSON() ([]byte, error) { + type NoMethod AssetsExportJobExportCondition + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// AssetsExportJobNetworkDependencies: Configuration for network dependencies +// exports. +type AssetsExportJobNetworkDependencies struct { + // MaxDays: Optional. When this value is set to a positive integer, network + // connections data will be returned for the most recent days for which data is + // available. When this value is unset (or set to zero), all available data is + // returned. + MaxDays int64 `json:"maxDays,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxDays") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxDays") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *AssetsExportJobNetworkDependencies) MarshalJSON() ([]byte, error) { + type NoMethod AssetsExportJobNetworkDependencies + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // AwsEc2PlatformDetails: AWS EC2 specific details. type AwsEc2PlatformDetails struct { // Location: The location of the machine in the AWS format. @@ -1252,10 +1412,10 @@ func (s *ComputeEngineMigrationTarget) MarshalJSON() ([]byte, error) { // ComputeEnginePreferences: The user preferences relating to Compute Engine // target platform. type ComputeEnginePreferences struct { - // LicenseType: Overridden by os_pricing_preferences if specified. License type - // to consider when calculating costs for virtual machine insights and - // recommendations. If unspecified, costs are calculated based on the default - // licensing plan. + // LicenseType: If os_pricing_preferences is specified, it overrides this + // field. License type to consider when calculating costs for virtual machine + // insights and recommendations. If unspecified, costs are calculated based on + // the default licensing plan. // // Possible values: // "LICENSE_TYPE_UNSPECIFIED" - Unspecified (default value). @@ -3421,6 +3581,35 @@ func (s *IssueCompatibilityIssue) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ListAssetsExportJobsResponse: Response message for listing assets export +// jobs. +type ListAssetsExportJobsResponse struct { + // AssetsExportJobs: Output only. The list of assets export jobs. + AssetsExportJobs []*AssetsExportJob `json:"assetsExportJobs,omitempty"` + // NextPageToken: Output only. A token identifying a page of results the server + // should return. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "AssetsExportJobs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssetsExportJobs") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ListAssetsExportJobsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAssetsExportJobsResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ListAssetsResponse: Response message for listing assets. type ListAssetsResponse struct { // Assets: A list of assets. @@ -5585,6 +5774,62 @@ func (s *ReportSummaryVMWareNodeAllocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// RunAssetsExportJobRequest: A request to run an assets export job. +type RunAssetsExportJobRequest struct { + // RequestId: Optional. An optional request ID to identify requests. Specify a + // unique request ID so that if you must retry your request, the server will + // know to ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. For example, + // consider a situation where you make an initial request and the request times + // out. If you make the request again with the same request ID, the server can + // check if original operation with the same request ID was received, and if + // so, will ignore the second request. This prevents clients from accidentally + // creating duplicate commitments. The request ID must be a valid UUID with the + // exception that zero UUID is not supported + // (00000000-0000-0000-0000-000000000000). + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "RequestId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RequestId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *RunAssetsExportJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod RunAssetsExportJobRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// RunAssetsExportJobResponse: Response message for running an assets export +// job. +type RunAssetsExportJobResponse struct { + // AssetsExportJobExecution: Output only. Execution status of the assets export + // operation. + AssetsExportJobExecution *AssetsExportJobExecution `json:"assetsExportJobExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "AssetsExportJobExecution") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AssetsExportJobExecution") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *RunAssetsExportJobResponse) MarshalJSON() ([]byte, error) { + type NoMethod RunAssetsExportJobResponse + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // RunImportJobRequest: A request to run an import job. type RunImportJobRequest struct { // RequestId: Optional. An optional request ID to identify requests. Specify a @@ -5830,6 +6075,56 @@ func (s *Settings) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SignedUri: Contains a signed URI. +type SignedUri struct { + // File: Output only. Name of the file the Signed URI references. + File string `json:"file,omitempty"` + // Uri: Output only. Download URI for the file. + Uri string `json:"uri,omitempty"` + // ForceSendFields is a list of field names (e.g. "File") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "File") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *SignedUri) MarshalJSON() ([]byte, error) { + type NoMethod SignedUri + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// SignedUriDestination: Signed URI destination configuration. +type SignedUriDestination struct { +} + +// SignedUris: Contains a list of Signed URIs. +type SignedUris struct { + // SignedUris: Output only. List of signed URIs. + SignedUris []*SignedUri `json:"signedUris,omitempty"` + // ForceSendFields is a list of field names (e.g. "SignedUris") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SignedUris") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *SignedUris) MarshalJSON() ([]byte, error) { + type NoMethod SignedUris + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // SoftwareInsight: An insight regarding software detected on an asset. type SoftwareInsight struct { // DetectedSoftware: Output only. Information about the detected software. @@ -8241,6 +8536,578 @@ func (c *ProjectsLocationsAssetsReportAssetFramesCall) Do(opts ...googleapi.Call return ret, nil } +type ProjectsLocationsAssetsExportJobsCreateCall struct { + s *Service + parent string + assetsexportjob *AssetsExportJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new assets export job. +// +// - parent: The parent resource where the assts export job will be created. +func (r *ProjectsLocationsAssetsExportJobsService) Create(parent string, assetsexportjob *AssetsExportJob) *ProjectsLocationsAssetsExportJobsCreateCall { + c := &ProjectsLocationsAssetsExportJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.assetsexportjob = assetsexportjob + return c +} + +// AssetsExportJobId sets the optional parameter "assetsExportJobId": Required. +// The ID to use for the asset export job. +func (c *ProjectsLocationsAssetsExportJobsCreateCall) AssetsExportJobId(assetsExportJobId string) *ProjectsLocationsAssetsExportJobsCreateCall { + c.urlParams_.Set("assetsExportJobId", assetsExportJobId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional request ID to +// identify requests. Specify a unique request ID so that if you must retry +// your request, the server will know to ignore the request if it has already +// been completed. The server will guarantee that for at least 60 minutes after +// the first request. For example, consider a situation where you make an +// initial request and the request times out. If you make the request again +// with the same request ID, the server can check if original operation with +// the same request ID was received, and if so, will ignore the second request. +// This prevents clients from accidentally creating duplicate commitments. The +// request ID must be a valid UUID with the exception that zero UUID is not +// supported (00000000-0000-0000-0000-000000000000). +func (c *ProjectsLocationsAssetsExportJobsCreateCall) RequestId(requestId string) *ProjectsLocationsAssetsExportJobsCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAssetsExportJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsExportJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAssetsExportJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsAssetsExportJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAssetsExportJobsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsExportJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.assetsexportjob) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/assetsExportJobs") + 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 "migrationcenter.projects.locations.assetsExportJobs.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsAssetsExportJobsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAssetsExportJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes an assets export job. +// +// - name: The name of the assets export job to delete. +func (r *ProjectsLocationsAssetsExportJobsService) Delete(name string) *ProjectsLocationsAssetsExportJobsDeleteCall { + c := &ProjectsLocationsAssetsExportJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAssetsExportJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsExportJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAssetsExportJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsAssetsExportJobsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAssetsExportJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsExportJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+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 "migrationcenter.projects.locations.assetsExportJobs.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsAssetsExportJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAssetsExportJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of an assets export job. +// +// - name: Name of the resource. +func (r *ProjectsLocationsAssetsExportJobsService) Get(name string) *ProjectsLocationsAssetsExportJobsGetCall { + c := &ProjectsLocationsAssetsExportJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAssetsExportJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsExportJobsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsAssetsExportJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAssetsExportJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAssetsExportJobsGetCall) Context(ctx context.Context) *ProjectsLocationsAssetsExportJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAssetsExportJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsExportJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.assetsExportJobs.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *AssetsExportJob.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsAssetsExportJobsGetCall) Do(opts ...googleapi.CallOption) (*AssetsExportJob, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &AssetsExportJob{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAssetsExportJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the assets export jobs in a given project and location. +// +// - parent: Parent resource. +func (r *ProjectsLocationsAssetsExportJobsService) List(parent string) *ProjectsLocationsAssetsExportJobsListCall { + c := &ProjectsLocationsAssetsExportJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. The +// server may return fewer items than requested. If unspecified, the server +// will pick an appropriate default value. +func (c *ProjectsLocationsAssetsExportJobsListCall) PageSize(pageSize int64) *ProjectsLocationsAssetsExportJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results that the server should return. +func (c *ProjectsLocationsAssetsExportJobsListCall) PageToken(pageToken string) *ProjectsLocationsAssetsExportJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAssetsExportJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsExportJobsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsAssetsExportJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAssetsExportJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAssetsExportJobsListCall) Context(ctx context.Context) *ProjectsLocationsAssetsExportJobsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAssetsExportJobsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsExportJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/assetsExportJobs") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.assetsExportJobs.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAssetsExportJobsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAssetsExportJobsListCall) Do(opts ...googleapi.CallOption) (*ListAssetsExportJobsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &ListAssetsExportJobsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsAssetsExportJobsListCall) Pages(ctx context.Context, f func(*ListAssetsExportJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsAssetsExportJobsRunCall struct { + s *Service + name string + runassetsexportjobrequest *RunAssetsExportJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Run: Runs an assets export job, returning an AssetsExportJobExecution. +// +// - name: Name of the resource. +func (r *ProjectsLocationsAssetsExportJobsService) Run(name string, runassetsexportjobrequest *RunAssetsExportJobRequest) *ProjectsLocationsAssetsExportJobsRunCall { + c := &ProjectsLocationsAssetsExportJobsRunCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.runassetsexportjobrequest = runassetsexportjobrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAssetsExportJobsRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsAssetsExportJobsRunCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAssetsExportJobsRunCall) Context(ctx context.Context) *ProjectsLocationsAssetsExportJobsRunCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAssetsExportJobsRunCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAssetsExportJobsRunCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.runassetsexportjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:run") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "migrationcenter.projects.locations.assetsExportJobs.run" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsAssetsExportJobsRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDiscoveryClientsCreateCall struct { s *Service parent string diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 22640f430b7..aafc1f50d51 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -821,7 +821,7 @@ } } }, - "revision": "20240509", + "revision": "20240524", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1226,10 +1226,13 @@ ], "type": "string" }, - "recommendationSignalData": { - "$ref": "DatabaseResourceRecommendationSignalData", + "observabilityMetricData": { + "$ref": "ObservabilityMetricData", "description": "More feed data would be added in subsequent CLs" }, + "recommendationSignalData": { + "$ref": "DatabaseResourceRecommendationSignalData" + }, "resourceHealthSignalData": { "$ref": "DatabaseResourceHealthSignalData" }, @@ -1352,9 +1355,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -1480,6 +1491,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -1498,9 +1517,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -1736,6 +1763,10 @@ "description": "The resource location. REQUIRED", "type": "string" }, + "machineConfiguration": { + "$ref": "MachineConfiguration", + "description": "Machine configuration for this resource." + }, "primaryResourceId": { "$ref": "DatabaseResourceId", "description": "Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested, otherwise optional." @@ -1760,14 +1791,6 @@ "userLabelSet": { "$ref": "UserLabels", "description": "User-provided labels associated with the resource" - }, - "userLabels": { - "additionalProperties": { - "type": "string" - }, - "deprecated": true, - "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", - "type": "object" } }, "type": "object" @@ -1843,9 +1866,17 @@ "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", + "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0", "SIGNAL_TYPE_VIOLATES_NIST_800_53", + "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5", + "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0", "SIGNAL_TYPE_VIOLATES_ISO_27001", + "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022", "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", + "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0", + "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4", + "SIGNAL_TYPE_VIOLATES_HIPAA", + "SIGNAL_TYPE_VIOLATES_SOC2_V2017", "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", "SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", "SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", @@ -1971,6 +2002,14 @@ false, false, false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -1989,9 +2028,17 @@ "Represents if a resource violates CIS GCP Foundation 1.2.", "Represents if a resource violates CIS GCP Foundation 1.1.", "Represents if a resource violates CIS GCP Foundation 1.0.", + "Represents if a resource violates CIS Controls 8.0.", "Represents if a resource violates NIST 800-53.", + "Represents if a resource violates NIST 800-53 R5.", + "Represents if a resource violates NIST Cybersecurity Framework 1.0.", "Represents if a resource violates ISO-27001.", + "Represents if a resource violates ISO 27001 2022.", "Represents if a resource violates PCI-DSS v3.2.1.", + "Represents if a resource violates PCI-DSS v4.0.", + "Represents if a resource violates Cloud Controls Matrix v4.0.", + "Represents if a resource violates HIPAA.", + "Represents if a resource violates SOC2 v2017.", "Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", "Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", @@ -2647,6 +2694,23 @@ }, "type": "object" }, + "MachineConfiguration": { + "description": "MachineConfiguration describes the configuration of a machine specific to Database Resource.", + "id": "MachineConfiguration", + "properties": { + "cpuCount": { + "description": "The number of CPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", + "format": "int32", + "type": "integer" + }, + "memorySizeInBytes": { + "description": "Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations again after bug fix.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "MaintenancePolicy": { "description": "Maintenance policy for an instance.", "id": "MaintenancePolicy", @@ -2737,6 +2801,53 @@ }, "type": "object" }, + "ObservabilityMetricData": { + "id": "ObservabilityMetricData", + "properties": { + "aggregationType": { + "description": "Required. Type of aggregation performed on the metric.", + "enum": [ + "AGGREGATION_TYPE_UNSPECIFIED", + "MAXIMUM" + ], + "enumDescriptions": [ + "Unspecified aggregation type.", + "Maximum aggregation type." + ], + "type": "string" + }, + "metricType": { + "description": "Required. Type of metric like CPU, Memory, etc.", + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "CPU_UTILIZATION", + "MEMORY_UTILIZATION", + "NETWORK_CONNECTIONS" + ], + "enumDescriptions": [ + "", + "CPU utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Memory utilization for a resource. The value is a fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases).", + "Number of network connections for a resource." + ], + "type": "string" + }, + "observationTime": { + "description": "Required. The time the metric value was observed.", + "format": "google-datetime", + "type": "string" + }, + "resourceName": { + "description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", + "type": "string" + }, + "value": { + "$ref": "TypedValue", + "description": "Required. Value of the metric type." + } + }, + "type": "object" + }, "Operation": { "description": "This resource represents a long-running operation that is the result of a network API call.", "id": "Operation", @@ -3275,6 +3386,27 @@ }, "type": "object" }, + "TypedValue": { + "description": "TypedValue represents the value of a metric type. It can either be a double, an int64, a string or a bool.", + "id": "TypedValue", + "properties": { + "boolValue": { + "type": "boolean" + }, + "doubleValue": { + "format": "double", + "type": "number" + }, + "int64Value": { + "format": "int64", + "type": "string" + }, + "stringValue": { + "type": "string" + } + }, + "type": "object" + }, "UpdateInfo": { "description": "Represents information about an updating cluster.", "id": "UpdateInfo", diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 1877f03c74c..a58b2193f9c 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -641,7 +641,8 @@ type DatabaseResourceFeed struct { // "RECOMMENDATION_SIGNAL_DATA" - Database resource recommendation signal // data FeedType string `json:"feedType,omitempty"` - // RecommendationSignalData: More feed data would be added in subsequent CLs + // ObservabilityMetricData: More feed data would be added in subsequent CLs + ObservabilityMetricData *ObservabilityMetricData `json:"observabilityMetricData,omitempty"` RecommendationSignalData *DatabaseResourceRecommendationSignalData `json:"recommendationSignalData,omitempty"` ResourceHealthSignalData *DatabaseResourceHealthSignalData `json:"resourceHealthSignalData,omitempty"` // ResourceId: Primary key associated with the Resource. resource_id is @@ -769,12 +770,27 @@ type DatabaseResourceHealthSignalData struct { // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -1038,6 +1054,8 @@ type DatabaseResourceMetadata struct { InstanceType string `json:"instanceType,omitempty"` // Location: The resource location. REQUIRED Location string `json:"location,omitempty"` + // MachineConfiguration: Machine configuration for this resource. + MachineConfiguration *MachineConfiguration `json:"machineConfiguration,omitempty"` // PrimaryResourceId: Identifier for this resource's immediate parent/primary // resource if the current resource is a replica or derived form of another // Database resource. Else it would be NULL. REQUIRED if the immediate parent @@ -1061,9 +1079,6 @@ type DatabaseResourceMetadata struct { UpdationTime string `json:"updationTime,omitempty"` // UserLabelSet: User-provided labels associated with the resource UserLabelSet *UserLabels `json:"userLabelSet,omitempty"` - // UserLabels: User-provided labels, represented as a dictionary where each - // label is a single key value pair. - UserLabels map[string]string `json:"userLabels,omitempty"` // ForceSendFields is a list of field names (e.g. "AvailabilityConfiguration") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -1166,12 +1181,27 @@ type DatabaseResourceRecommendationSignalData struct { // violates CIS GCP Foundation 1.1. // "SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0" - Represents if a resource // violates CIS GCP Foundation 1.0. + // "SIGNAL_TYPE_VIOLATES_CIS_CONTROLS_V8_0" - Represents if a resource + // violates CIS Controls 8.0. // "SIGNAL_TYPE_VIOLATES_NIST_800_53" - Represents if a resource violates // NIST 800-53. + // "SIGNAL_TYPE_VIOLATES_NIST_800_53_R5" - Represents if a resource violates + // NIST 800-53 R5. + // "SIGNAL_TYPE_VIOLATES_NIST_CYBERSECURITY_FRAMEWORK_V1_0" - Represents if a + // resource violates NIST Cybersecurity Framework 1.0. // "SIGNAL_TYPE_VIOLATES_ISO_27001" - Represents if a resource violates // ISO-27001. + // "SIGNAL_TYPE_VIOLATES_ISO_27001_V2022" - Represents if a resource violates + // ISO 27001 2022. // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1" - Represents if a resource violates // PCI-DSS v3.2.1. + // "SIGNAL_TYPE_VIOLATES_PCI_DSS_V4_0" - Represents if a resource violates + // PCI-DSS v4.0. + // "SIGNAL_TYPE_VIOLATES_CLOUD_CONTROLS_MATRIX_V4" - Represents if a resource + // violates Cloud Controls Matrix v4.0. + // "SIGNAL_TYPE_VIOLATES_HIPAA" - Represents if a resource violates HIPAA. + // "SIGNAL_TYPE_VIOLATES_SOC2_V2017" - Represents if a resource violates SOC2 + // v2017. // "SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING" - Represents if // log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not // set to on. @@ -2018,6 +2048,33 @@ func (s *Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// MachineConfiguration: MachineConfiguration describes the configuration of a +// machine specific to Database Resource. +type MachineConfiguration struct { + // CpuCount: The number of CPUs. TODO(b/342344482, b/342346271) add proto + // validations again after bug fix. + CpuCount int64 `json:"cpuCount,omitempty"` + // MemorySizeInBytes: Memory size in bytes. TODO(b/342344482, b/342346271) add + // proto validations again after bug fix. + MemorySizeInBytes int64 `json:"memorySizeInBytes,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CpuCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CpuCount") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *MachineConfiguration) MarshalJSON() ([]byte, error) { + type NoMethod MachineConfiguration + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // MaintenancePolicy: Maintenance policy for an instance. type MaintenancePolicy struct { // CreateTime: Output only. The time when the policy was created. @@ -2128,6 +2185,49 @@ func (s *NodeInfo) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +type ObservabilityMetricData struct { + // AggregationType: Required. Type of aggregation performed on the metric. + // + // Possible values: + // "AGGREGATION_TYPE_UNSPECIFIED" - Unspecified aggregation type. + // "MAXIMUM" - Maximum aggregation type. + AggregationType string `json:"aggregationType,omitempty"` + // MetricType: Required. Type of metric like CPU, Memory, etc. + // + // Possible values: + // "METRIC_TYPE_UNSPECIFIED" + // "CPU_UTILIZATION" - CPU utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "MEMORY_UTILIZATION" - Memory utilization for a resource. The value is a + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). + // "NETWORK_CONNECTIONS" - Number of network connections for a resource. + MetricType string `json:"metricType,omitempty"` + // ObservationTime: Required. The time the metric value was observed. + ObservationTime string `json:"observationTime,omitempty"` + // ResourceName: Required. Database resource name associated with the signal. + // Resource name to follow CAIS resource_name format as noted here + // go/condor-common-datamodel + ResourceName string `json:"resourceName,omitempty"` + // Value: Required. Value of the metric type. + Value *TypedValue `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregationType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AggregationType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ObservabilityMetricData) MarshalJSON() ([]byte, error) { + type NoMethod ObservabilityMetricData + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Operation: This resource represents a long-running operation that is the // result of a network API call. type Operation struct { @@ -2709,6 +2809,45 @@ func (s *TlsCertificate) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// TypedValue: TypedValue represents the value of a metric type. It can either +// be a double, an int64, a string or a bool. +type TypedValue struct { + BoolValue bool `json:"boolValue,omitempty"` + DoubleValue float64 `json:"doubleValue,omitempty"` + Int64Value int64 `json:"int64Value,omitempty,string"` + StringValue string `json:"stringValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoolValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoolValue") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *TypedValue) MarshalJSON() ([]byte, error) { + type NoMethod TypedValue + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +func (s *TypedValue) UnmarshalJSON(data []byte) error { + type NoMethod TypedValue + var s1 struct { + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DoubleValue = float64(s1.DoubleValue) + return nil +} + // UpdateInfo: Represents information about an updating cluster. type UpdateInfo struct { // TargetReplicaCount: Target number of replica nodes per shard. diff --git a/spanner/v1/spanner-api.json b/spanner/v1/spanner-api.json index bc4bf2f68b0..defaa691eaa 100644 --- a/spanner/v1/spanner-api.json +++ b/spanner/v1/spanner-api.json @@ -1396,6 +1396,35 @@ }, "databases": { "methods": { + "changequorum": { + "description": "ChangeQuorum is strictly restricted to databases that use dual region instance configurations. Initiates a background operation to change quorum a database from dual-region mode to single-region mode and vice versa. The returned long-running operation will have a name of the format `projects//instances//databases//operations/` and can be used to track execution of the ChangeQuorum. The metadata field type is ChangeQuorumMetadata. Authorization requires `spanner.databases.changequorum` permission on the resource database.", + "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:changequorum", + "httpMethod": "POST", + "id": "spanner.projects.instances.databases.changequorum", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the database in which to apply the ChangeQuorum. Values are of the form `projects//instances//databases/`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:changequorum", + "request": { + "$ref": "ChangeQuorumRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/spanner.admin" + ] + }, "create": { "description": "Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.", "flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", @@ -2613,7 +2642,7 @@ "type": "string" }, "parent": { - "description": "Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.", + "description": "Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`. Use `{instance} = '-'` to list instance partitions for all Instances in a project, e.g., `projects/myproject/instances/-`.", "location": "path", "pattern": "^projects/[^/]+/instances/[^/]+$", "required": true, @@ -2976,7 +3005,7 @@ } } }, - "revision": "20240423", + "revision": "20240527", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "AutoscalingConfig": { @@ -3278,6 +3307,46 @@ }, "type": "object" }, + "ChangeQuorumMetadata": { + "description": "Metadata type for the long-running operation returned by ChangeQuorum.", + "id": "ChangeQuorumMetadata", + "properties": { + "endTime": { + "description": "If set, the time at which this operation failed or was completed successfully.", + "format": "google-datetime", + "type": "string" + }, + "request": { + "$ref": "ChangeQuorumRequest", + "description": "The request for ChangeQuorum." + }, + "startTime": { + "description": "Time the request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "ChangeQuorumRequest": { + "description": "The request for ChangeQuorum.", + "id": "ChangeQuorumRequest", + "properties": { + "etag": { + "description": "Optional. The etag is the hash of the QuorumInfo. The ChangeQuorum operation will only be performed if the etag matches that of the QuorumInfo in the current database resource. Otherwise the API will return an `ABORTED` error. The etag is used for optimistic concurrency control as a way to help prevent simultaneous change quorum requests that could create a race condition.", + "type": "string" + }, + "name": { + "description": "Required. Name of the database in which to apply the ChangeQuorum. Values are of the form `projects//instances//databases/`.", + "type": "string" + }, + "quorumType": { + "$ref": "QuorumType", + "description": "Required. The type of this Quorum." + } + }, + "type": "object" + }, "ChildLink": { "description": "Metadata associated with a parent-child relationship appearing in a PlanNode.", "id": "ChildLink", @@ -3761,6 +3830,11 @@ "description": "Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.", "type": "string" }, + "quorumInfo": { + "$ref": "QuorumInfo", + "description": "Output only. Applicable only for databases that use dual region instance configurations. Contains information about the quorum.", + "readOnly": true + }, "reconciling": { "description": "Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.", "readOnly": true, @@ -3915,6 +3989,12 @@ }, "type": "object" }, + "DualRegionQuorum": { + "description": "Message type for a dual-region quorum. Currently this type has no options.", + "id": "DualRegionQuorum", + "properties": {}, + "type": "object" + }, "Empty": { "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }", "id": "Empty", @@ -4343,12 +4423,12 @@ "type": "string" }, "nodeCount": { - "description": "The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", + "description": "The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. If autoscaling is enabled, node_count is treated as an OUTPUT_ONLY field and reflects the current number of nodes allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", "format": "int32", "type": "integer" }, "processingUnits": { - "description": "The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. Users can set the processing_units field to specify the target number of processing units allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", + "description": "The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. Users can set the processing_units field to specify the target number of processing units allocated to the instance. If autoscaling is enabled, processing_units is treated as an OUTPUT_ONLY field and reflects the current number of processing units allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", "format": "int32", "type": "integer" }, @@ -4452,6 +4532,23 @@ "readOnly": true, "type": "array" }, + "quorumType": { + "description": "Output only. The `QuorumType` of the instance configuration.", + "enum": [ + "QUORUM_TYPE_UNSPECIFIED", + "REGION", + "DUAL_REGION", + "MULTI_REGION" + ], + "enumDescriptions": [ + "Not specified.", + "An instance configuration tagged with REGION quorum type forms a write quorum in a single region.", + "An instance configuration tagged with DUAL_REGION quorum type forms a write quorums with exactly two read-write regions in a multi-region configuration. This instance configurations requires reconfiguration in the event of regional failures.", + "An instance configuration tagged with MULTI_REGION quorum type forms a write quorums from replicas are spread across more than one region in a multi-region configuration." + ], + "readOnly": true, + "type": "string" + }, "reconciling": { "description": "Output only. If true, the instance config is being created or updated. If false, there are no ongoing operations for the instance config.", "readOnly": true, @@ -4886,7 +4983,7 @@ "type": "string" }, "unreachable": { - "description": "The list of unreachable instance partitions. It includes the names of instance partitions whose metadata could not be retrieved within instance_partition_deadline.", + "description": "The list of unreachable instances or instance partitions. It includes the names of instances or instance partitions whose metadata could not be retrieved within instance_partition_deadline.", "items": { "type": "string" }, @@ -5531,6 +5628,59 @@ }, "type": "object" }, + "QuorumInfo": { + "description": "Information about the dual region quorum.", + "id": "QuorumInfo", + "properties": { + "etag": { + "description": "Output only. The etag is used for optimistic concurrency control as a way to help prevent simultaneous ChangeQuorum requests that could create a race condition.", + "readOnly": true, + "type": "string" + }, + "initiator": { + "description": "Output only. Whether this ChangeQuorum is a Google or User initiated.", + "enum": [ + "INITIATOR_UNSPECIFIED", + "GOOGLE", + "USER" + ], + "enumDescriptions": [ + "Unspecified.", + "ChangeQuorum initiated by Google.", + "ChangeQuorum initiated by User." + ], + "readOnly": true, + "type": "string" + }, + "quorumType": { + "$ref": "QuorumType", + "description": "Output only. The type of this quorum. See QuorumType for more information about quorum type specifications.", + "readOnly": true + }, + "startTime": { + "description": "Output only. The timestamp when the request was triggered.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "QuorumType": { + "description": "Information about the database quorum type. this applies only for dual region instance configs.", + "id": "QuorumType", + "properties": { + "dualRegion": { + "$ref": "DualRegionQuorum", + "description": "Dual region quorum type." + }, + "singleRegion": { + "$ref": "SingleRegionQuorum", + "description": "Single region quorum type." + } + }, + "type": "object" + }, "ReadOnly": { "description": "Message type to initiate a read-only transaction.", "id": "ReadOnly", @@ -6055,6 +6205,17 @@ }, "type": "object" }, + "SingleRegionQuorum": { + "description": "Message type for a single-region quorum.", + "id": "SingleRegionQuorum", + "properties": { + "servingLocation": { + "description": "Required. The location of the serving region, e.g. \"us-central1\". The location must be one of the regions within the dual region instance configuration of your database. The list of valid locations is available via [GetInstanceConfig[InstanceAdmin.GetInstanceConfig] API. This should only be used if you plan to change quorum in single-region quorum type.", + "type": "string" + } + }, + "type": "object" + }, "Statement": { "description": "A single DML statement.", "id": "Statement", @@ -6168,7 +6329,7 @@ "type": "object" }, "TransactionOptions": { - "description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed consistency across several reads, but do not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past, or configured to perform a strong read (where Spanner will select a timestamp such that the read is guaranteed to see the effects of all transactions that have committed before the start of the read). Snapshot read-only transactions do not need to be committed. Queries on change streams must be performed with the snapshot read-only transaction mode, specifying a strong read. Please see TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Note that the lock priority is preserved per session (not per transaction). Lock priority is set by the first read or write in the first attempt of a read-write transaction. If the application starts a new session to retry the whole transaction, the transaction loses its original lock priority. Moreover, the lock priority is only preserved if the transaction fails with an `ABORTED` error. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. Queries on change streams (see below for more details) must also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps \u003c= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Querying change Streams: A Change Stream is a schema object that can be configured to watch data changes on the entire database, a set of tables, or a set of columns in a database. When a change stream is created, Spanner automatically defines a corresponding SQL Table-Valued Function (TVF) that can be used to query the change records in the associated change stream using the ExecuteStreamingSql API. The name of the TVF for a change stream is generated from the name of the change stream: READ_. All queries on change stream TVFs must be executed using the ExecuteStreamingSql API with a single-use read-only transaction with a strong read-only timestamp_bound. The change stream TVF allows users to specify the start_timestamp and end_timestamp for the time range of interest. All change records within the retention period is accessible using the strong read-only timestamp_bound. All other TransactionOptions are invalid for change stream queries. In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement is applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", + "description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed consistency across several reads, but do not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past, or configured to perform a strong read (where Spanner will select a timestamp such that the read is guaranteed to see the effects of all transactions that have committed before the start of the read). Snapshot read-only transactions do not need to be committed. Queries on change streams must be performed with the snapshot read-only transaction mode, specifying a strong read. See TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Note that the lock priority is preserved per session (not per transaction). Lock priority is set by the first read or write in the first attempt of a read-write transaction. If the application starts a new session to retry the whole transaction, the transaction loses its original lock priority. Moreover, the lock priority is only preserved if the transaction fails with an `ABORTED` error. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. Queries on change streams (see below for more details) must also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps \u003c= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Querying change Streams: A Change Stream is a schema object that can be configured to watch data changes on the entire database, a set of tables, or a set of columns in a database. When a change stream is created, Spanner automatically defines a corresponding SQL Table-Valued Function (TVF) that can be used to query the change records in the associated change stream using the ExecuteStreamingSql API. The name of the TVF for a change stream is generated from the name of the change stream: READ_. All queries on change stream TVFs must be executed using the ExecuteStreamingSql API with a single-use read-only transaction with a strong read-only timestamp_bound. The change stream TVF allows users to specify the start_timestamp and end_timestamp for the time range of interest. All change records within the retention period is accessible using the strong read-only timestamp_bound. All other TransactionOptions are invalid for change stream queries. In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement is applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", "id": "TransactionOptions", "properties": { "excludeTxnFromChangeStreams": { diff --git a/spanner/v1/spanner-gen.go b/spanner/v1/spanner-gen.go index cc99bcbc27c..92783f498f9 100644 --- a/spanner/v1/spanner-gen.go +++ b/spanner/v1/spanner-gen.go @@ -877,6 +877,66 @@ func (s *Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// ChangeQuorumMetadata: Metadata type for the long-running operation returned +// by ChangeQuorum. +type ChangeQuorumMetadata struct { + // EndTime: If set, the time at which this operation failed or was completed + // successfully. + EndTime string `json:"endTime,omitempty"` + // Request: The request for ChangeQuorum. + Request *ChangeQuorumRequest `json:"request,omitempty"` + // StartTime: Time the request was received. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ChangeQuorumMetadata) MarshalJSON() ([]byte, error) { + type NoMethod ChangeQuorumMetadata + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// ChangeQuorumRequest: The request for ChangeQuorum. +type ChangeQuorumRequest struct { + // Etag: Optional. The etag is the hash of the QuorumInfo. The ChangeQuorum + // operation will only be performed if the etag matches that of the QuorumInfo + // in the current database resource. Otherwise the API will return an `ABORTED` + // error. The etag is used for optimistic concurrency control as a way to help + // prevent simultaneous change quorum requests that could create a race + // condition. + Etag string `json:"etag,omitempty"` + // Name: Required. Name of the database in which to apply the ChangeQuorum. + // Values are of the form `projects//instances//databases/`. + Name string `json:"name,omitempty"` + // QuorumType: Required. The type of this Quorum. + QuorumType *QuorumType `json:"quorumType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Etag") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *ChangeQuorumRequest) MarshalJSON() ([]byte, error) { + type NoMethod ChangeQuorumRequest + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ChildLink: Metadata associated with a parent-child relationship appearing in // a PlanNode. type ChildLink struct { @@ -1569,6 +1629,9 @@ type Database struct { // DATABASE` statement. This name can be passed to other API methods to // identify the database. Name string `json:"name,omitempty"` + // QuorumInfo: Output only. Applicable only for databases that use dual region + // instance configurations. Contains information about the quorum. + QuorumInfo *QuorumInfo `json:"quorumInfo,omitempty"` // Reconciling: Output only. If true, the database is being updated. If false, // there are no ongoing update operations for the database. Reconciling bool `json:"reconciling,omitempty"` @@ -1802,6 +1865,11 @@ func (s *DirectedReadOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// DualRegionQuorum: Message type for a dual-region quorum. Currently this type +// has no options. +type DualRegionQuorum struct { +} + // Empty: A generic empty message that you can re-use to avoid defining // duplicated empty messages in your APIs. A typical example is to use it as // the request or the response type of an API method. For instance: service Foo @@ -2471,18 +2539,23 @@ type Instance struct { // NodeCount: The number of nodes allocated to this instance. At most one of // either node_count or processing_units should be present in the message. // Users can set the node_count field to specify the target number of nodes - // allocated to the instance. This may be zero in API responses for instances - // that are not yet in state `READY`. See the documentation + // allocated to the instance. If autoscaling is enabled, node_count is treated + // as an OUTPUT_ONLY field and reflects the current number of nodes allocated + // to the instance. This may be zero in API responses for instances that are + // not yet in state `READY`. See the documentation // (https://cloud.google.com/spanner/docs/compute-capacity) for more // information about nodes and processing units. NodeCount int64 `json:"nodeCount,omitempty"` // ProcessingUnits: The number of processing units allocated to this instance. // At most one of processing_units or node_count should be present in the // message. Users can set the processing_units field to specify the target - // number of processing units allocated to the instance. This may be zero in - // API responses for instances that are not yet in state `READY`. See the - // documentation (https://cloud.google.com/spanner/docs/compute-capacity) for - // more information about nodes and processing units. + // number of processing units allocated to the instance. If autoscaling is + // enabled, processing_units is treated as an OUTPUT_ONLY field and reflects + // the current number of processing units allocated to the instance. This may + // be zero in API responses for instances that are not yet in state `READY`. + // See the documentation + // (https://cloud.google.com/spanner/docs/compute-capacity) for more + // information about nodes and processing units. ProcessingUnits int64 `json:"processingUnits,omitempty"` // State: Output only. The current instance state. For CreateInstance, the // state must be either omitted or set to `CREATING`. For UpdateInstance, the @@ -2590,6 +2663,20 @@ type InstanceConfig struct { // from for user managed configurations. Populated for Google managed // configurations. OptionalReplicas []*ReplicaInfo `json:"optionalReplicas,omitempty"` + // QuorumType: Output only. The `QuorumType` of the instance configuration. + // + // Possible values: + // "QUORUM_TYPE_UNSPECIFIED" - Not specified. + // "REGION" - An instance configuration tagged with REGION quorum type forms + // a write quorum in a single region. + // "DUAL_REGION" - An instance configuration tagged with DUAL_REGION quorum + // type forms a write quorums with exactly two read-write regions in a + // multi-region configuration. This instance configurations requires + // reconfiguration in the event of regional failures. + // "MULTI_REGION" - An instance configuration tagged with MULTI_REGION quorum + // type forms a write quorums from replicas are spread across more than one + // region in a multi-region configuration. + QuorumType string `json:"quorumType,omitempty"` // Reconciling: Output only. If true, the instance config is being created or // updated. If false, there are no ongoing operations for the instance config. Reconciling bool `json:"reconciling,omitempty"` @@ -3182,9 +3269,9 @@ type ListInstancePartitionsResponse struct { // ListInstancePartitions call to fetch more of the matching instance // partitions. NextPageToken string `json:"nextPageToken,omitempty"` - // Unreachable: The list of unreachable instance partitions. It includes the - // names of instance partitions whose metadata could not be retrieved within - // instance_partition_deadline. + // Unreachable: The list of unreachable instances or instance partitions. It + // includes the names of instances or instance partitions whose metadata could + // not be retrieved within instance_partition_deadline. Unreachable []string `json:"unreachable,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -4229,6 +4316,68 @@ func (s *QueryPlan) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// QuorumInfo: Information about the dual region quorum. +type QuorumInfo struct { + // Etag: Output only. The etag is used for optimistic concurrency control as a + // way to help prevent simultaneous ChangeQuorum requests that could create a + // race condition. + Etag string `json:"etag,omitempty"` + // Initiator: Output only. Whether this ChangeQuorum is a Google or User + // initiated. + // + // Possible values: + // "INITIATOR_UNSPECIFIED" - Unspecified. + // "GOOGLE" - ChangeQuorum initiated by Google. + // "USER" - ChangeQuorum initiated by User. + Initiator string `json:"initiator,omitempty"` + // QuorumType: Output only. The type of this quorum. See QuorumType for more + // information about quorum type specifications. + QuorumType *QuorumType `json:"quorumType,omitempty"` + // StartTime: Output only. The timestamp when the request was triggered. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Etag") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *QuorumInfo) MarshalJSON() ([]byte, error) { + type NoMethod QuorumInfo + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + +// QuorumType: Information about the database quorum type. this applies only +// for dual region instance configs. +type QuorumType struct { + // DualRegion: Dual region quorum type. + DualRegion *DualRegionQuorum `json:"dualRegion,omitempty"` + // SingleRegion: Single region quorum type. + SingleRegion *SingleRegionQuorum `json:"singleRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "DualRegion") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DualRegion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *QuorumType) MarshalJSON() ([]byte, error) { + type NoMethod QuorumType + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // ReadOnly: Message type to initiate a read-only transaction. type ReadOnly struct { // ExactStaleness: Executes all reads at a timestamp that is `exact_staleness` @@ -4976,6 +5125,33 @@ func (s *ShortRepresentation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) } +// SingleRegionQuorum: Message type for a single-region quorum. +type SingleRegionQuorum struct { + // ServingLocation: Required. The location of the serving region, e.g. + // "us-central1". The location must be one of the regions within the dual + // region instance configuration of your database. The list of valid locations + // is available via [GetInstanceConfig[InstanceAdmin.GetInstanceConfig] API. + // This should only be used if you plan to change quorum in single-region + // quorum type. + ServingLocation string `json:"servingLocation,omitempty"` + // ForceSendFields is a list of field names (e.g. "ServingLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ServingLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s *SingleRegionQuorum) MarshalJSON() ([]byte, error) { + type NoMethod SingleRegionQuorum + return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) +} + // Statement: A single DML statement. type Statement struct { // ParamTypes: It is not always possible for Cloud Spanner to infer the right @@ -5176,7 +5352,7 @@ func (s *Transaction) MarshalJSON() ([]byte, error) { // have committed before the start of the read). Snapshot read-only // transactions do not need to be committed. Queries on change streams must be // performed with the snapshot read-only transaction mode, specifying a strong -// read. Please see TransactionOptions.ReadOnly.strong for more details. 3. +// read. See TransactionOptions.ReadOnly.strong for more details. 3. // Partitioned DML. This type of transaction is used to execute a single // Partitioned DML statement. Partitioned DML partitions the key space and runs // the DML statement over each partition in parallel using separate, internal @@ -10696,6 +10872,115 @@ func (c *ProjectsInstancesDatabaseOperationsListCall) Pages(ctx context.Context, } } +type ProjectsInstancesDatabasesChangequorumCall struct { + s *Service + name string + changequorumrequest *ChangeQuorumRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Changequorum: ChangeQuorum is strictly restricted to databases that use dual +// region instance configurations. Initiates a background operation to change +// quorum a database from dual-region mode to single-region mode and vice +// versa. The returned long-running operation will have a name of the format +// `projects//instances//databases//operations/` and can be used to track +// execution of the ChangeQuorum. The metadata field type is +// ChangeQuorumMetadata. Authorization requires +// `spanner.databases.changequorum` permission on the resource database. +// +// - name: Name of the database in which to apply the ChangeQuorum. Values are +// of the form `projects//instances//databases/`. +func (r *ProjectsInstancesDatabasesService) Changequorum(name string, changequorumrequest *ChangeQuorumRequest) *ProjectsInstancesDatabasesChangequorumCall { + c := &ProjectsInstancesDatabasesChangequorumCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.changequorumrequest = changequorumrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsInstancesDatabasesChangequorumCall) Fields(s ...googleapi.Field) *ProjectsInstancesDatabasesChangequorumCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsInstancesDatabasesChangequorumCall) Context(ctx context.Context) *ProjectsInstancesDatabasesChangequorumCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsInstancesDatabasesChangequorumCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsInstancesDatabasesChangequorumCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.changequorumrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:changequorum") + 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 "spanner.projects.instances.databases.changequorum" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsInstancesDatabasesChangequorumCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsInstancesDatabasesCreateCall struct { s *Service parent string @@ -15118,7 +15403,9 @@ type ProjectsInstancesInstancePartitionsListCall struct { // List: Lists all instance partitions for the given instance. // // - parent: The instance whose instance partitions should be listed. Values -// are of the form `projects//instances/`. +// are of the form `projects//instances/`. Use `{instance} = '-'` to list +// instance partitions for all Instances in a project, e.g., +// `projects/myproject/instances/-`. func (r *ProjectsInstancesInstancePartitionsService) List(parent string) *ProjectsInstancesInstancePartitionsListCall { c := &ProjectsInstancesInstancePartitionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent